Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
85 views

Design a context-free grammar (CFG) that generates all strings over {a, b, c} that contain at least one a, one b, and one c. Define the rules of the CFG. So I wrote this down: S -> XaXbXc | XaXcXb |...
0 votes
1 answer
257 views

I'm trying to make a Deterministic Finite Automaton (DFA) to accept binary strings that start with "1" and have a substring "11" in it, over {0,1}. Here is the DFA I created: ...
1 vote
1 answer
348 views

I'm trying to design a Turing Machine that takes as input a word formed by symbols of the alphabet Σ = {a, b} and counts, in binary, the occurrences of symbol a and the occurrences of symbol b. ...
0 votes
0 answers
47 views

this is the code : package Tp2; import java.util.Date; import java.util.Scanner; public class EX2_Date_forme { public static void main(String[] args) { Scanner sc = new Scanner(System....
2 votes
1 answer
561 views

I only have one letter available as a language (e.g.: x). If I now enter "xxx" or "xxxxx" then the machine should accept this input because in the former case the length is 3 and ...
0 votes
1 answer
65 views

I'm trying to follow Cormen - Algorithms, 3rd edition. Specifically, Chapter VII, 32 "String Matching". In general, I find this book extremely hard to follow, due to the abundance of math-...
1 vote
1 answer
654 views

I have enrolled into course of computational methods, and currently we are reviewing automata and regular expressions. In one of the course assignments we were asked to design a finite state automata ...
user avatar
0 votes
2 answers
3k views

Give a non-deterministic finite automata(NFA) which accepts the following language: The set of strings over the alphabet {0,1,...,9} such that the final digit has not appeared before. I have ...
1 vote
1 answer
80 views

Have a look at the syntax diagram for the escape language: I read the second set of transitions as follows: The state transitioned to by the \ symbol can transition to the accepting state if the next ...
2 votes
1 answer
408 views

I am using pytransitions and have come across the need to have several states which are unrelated with others, and would make much sense to model using a non deterministic state machine, which is ...
1 vote
1 answer
158 views

I've been asked to find the PDA for the language L over the alphabet {a,b,c,d} where L={(a^p)(b^2p)(c^r)(d^s)| p,r,s > 0 AND r=s} I have solved it using 5 states but I must solve it using 6 states. ...
1 vote
2 answers
369 views

Lets say I have a language like this: L_k:={w∈Σ∗: (w)10=i·k, i∈N}. now using k as a parameter I now want to define a DFA, that accepts L_{k}- and proof then that this DFA is valid. Important: k is a ...
user avatar
1 vote
1 answer
1k views

I've seen a picture of an automata represented as a DFA but it has arrows that has nothing on it! What do these arrows mean in DFA? I mean are they different from epsilon (ε) , because we do not have ...
alimrn's user avatar
  • 33
0 votes
1 answer
1k views

What would be the highest number of states a DFA would have for a language L*? Is it possible to define a worst-case scenario here?
0 votes
1 answer
607 views

I am trying to find either a grammar or a pushdown automaton that recognizes the following language: { ai bj bi aj | i,j >= 0 } Of all the examples that I have seen, I cannot wrap my head around ...

15 30 50 per page
1
2 3 4 5
...
9

AltStyle によって変換されたページ (->オリジナル) /