Im trying to figure out how to deduce what language a PDA recognizes, and feel like im close but am still missing out. Take the following PDA for example. I can make a transition chart to figure out what my delta (transitions) are but im lost from there on out. This isnt a homework assignment, just an example from the book. Heres the problem and the transition table:
how to figure out what language a PDA recognizes
3.3k Views Asked by jfisk At
1
There are 1 best solutions below
Related Questions in PUSHDOWN-AUTOMATON
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If I'm reading the notation correctly, it looks like it's L*, where L is the language you get by doing the loop once only. To go round the loop, you see a "c", some number of "a", the same number of "b", then another "c". So L = ca^nb^nc and the language of this PDA is (ca^nb^nc)*.
Naturally, check this and please tell me if I'm wrong. I can also explain better the process I went throug to try to figure this out.
EDIT: Explaining where I get a^nb^n from.
So the stack starts out with only the bottom-of-the-stack symbol Z. So initially, we're in state 1 with stack Z - (1, Z). We then see a c, and we transition to state 2, pushing a $ onto the stack; so we are in (2, $ Z). Then let's say we see n instances of a in a row; each time, we will add a new c to the stack and return to state 2. Therefore, we are now in configuration (2, c^n $ Z). Let's say we then see an instance of b. We transition to state 3 and remove a c from the stack; our configuration is now (3, c^(n-1) $ Z). Now we need to see instances of b until we have $ back on top of the stack; so, in state 3, we can see (n-1) instances of b, each of which will cause a single instance of c to be popped from the stack. After seeing these instances of b, we will be in configuration (3, $ Z). Finally, we will see another instance of c and, $ being on top of the stack, we can pop it and move back to state 1, in our initial configuration of (1, Z).
The (a^n)(b^n) comes from the fact that we put as many instances of c onto the stack as we see 'a' in state 2, and we remove from the stack in states 2 and 3 as many instances of c from the stack as we see instances of b. The choice of n to represent the length is completely arbitrary... it's only used to indicate that the number of instances of a and b must be the same, if we are able to see the $ on top of the stack and transition back to the accepting state.