Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please explain and draw stack too thanks Input 0,1 in array S While S is not empty Take 1 word from left , output it

please explain and draw stack too thanks image text in transcribed
Input 0,1 in array S While S is not empty Take 1 word from left , output it in c Delete the word from array S and set again to S If c='0' Then push it to stack Else if stack is not empty then pop '0' from stack else reject Accept S A.)If input is 001001110, is it rejected or not? B.)If input S, number of '0' is greater than number of '1', can we say that it is always rejected? C.)lf input S, number of '1' is greater than number of '0', can we say that it is always rejected? Input 0,1 in array S While S is not empty Take 1 word from left , output it in c Delete the word from array S and set again to S If c='0' Then push it to stack Else if stack is not empty then pop '0' from stack else reject Accept S A.)If input is 001001110, is it rejected or not? B.)If input S, number of '0' is greater than number of '1', can we say that it is always rejected? C.)lf input S, number of '1' is greater than number of '0', can we say that it is always rejected

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxxviii Special Issue On Database And Expert Systems Applications Lncs 11250

Authors: Abdelkader Hameurlain ,Roland Wagner ,Sven Hartmann ,Hui Ma

1st Edition

3662583836, 978-3662583838

More Books

Students also viewed these Databases questions