regular-language Questions

5

Solved

We all know that (a + b)* is a regular language for containing only symbols a and b. But (a + b)* is a string of infinite length and it is regular as we can build a finite automata, so it should b...

2

Solved

I understand how regular expressions got their name, and have read the related question (Why are regular expressions called "regular" expressions?), but am still wondering whether regular...
Dematerialize asked 29/3, 2016 at 11:34

1

How to calculate minimum pumping length of a regular language. For example if i have 0001* then minimum pumping length for this should be 4 ,that is 000 could not be pumped . Why it is so?
Hudgens asked 6/9, 2015 at 8:25

1

I am reading the code of a regular expression parser, and start to wonder if the syntax of regular expression is itself regular, and can be expressed with another (quite complicated) regular ...
Chingchinghai asked 3/9, 2015 at 6:50

8

Solved

I'm studying for my computing languages test, and there's one idea I'm having problems wrapping my head around. I understood that regular grammars are simpler and cannot contain ambiguity, but ca...
Mallory asked 18/2, 2009 at 3:46

1

Solved

I have a regular expression that matches English letters only, a [a-zA-Z] character class. Is there any built-in regular expression for that? I mean something like \s or \w.
Wist asked 7/5, 2015 at 20:12

4

So this is not about the pumping lemma and how it works, it's about a pre-condition. Everywhere in the net you can read, that regular languages must pass the pumping lemma, but noweher anybody tal...

3

I'm really new to this stuff so I apologize for the noobishness here. construct a Deterministic Finite Automaton DFA recognizing the following language: L= { w : w has at least two a's and an o...
Moidore asked 3/2, 2013 at 20:17

3

Solved

I'm trying to find a plain (i.e. non-formal) explanation of the 4 levels of formal grammars (unrestricted, context-sensitive, context-free, regular) as set out by Chomsky. It's been an age since I...

1

Solved

In my computational theory class we have an assignment of proving a language is regular. The language is defined as: B = {1ky | y is in {0, 1}* and y contains at least k 1s, for k >= 1} Thi...
Auberta asked 26/2, 2014 at 2:20

2

Solved

I want to create a DCG that languages like this get accepted: c bbbcbbb bbacbba abacaba aababacaababa As you can see this means that there is a specific order of a and b, then one c and then ag...
Purl asked 11/2, 2014 at 13:36

1

Solved

Given the following language: L1 = { (ab)n | n ≥ 0 } That is, L1 = { ε ab, abab, ababab, abababab, ... } The question is to find what language L12 is. My guess is that it's equal...

4

I have a large collection of regular expression that when matched call a particular http handler. Some of the older regex's are unreachable (e.g. a.c* ⊃ abc*) and I'd like to prune them. Is there ...
Currency asked 10/9, 2013 at 21:27

2

Solved

Can anyone kindly help me distinguish between regular languages (i.e. those that can be described by regular expressions) and other languages that are not regular in terms of the formal defin...
Boudreau asked 10/9, 2013 at 4:29

2

Given a regular expression R that describes a regular language (no fancy backreferences). Is there an algorithmic way to construct a regular expression R* that describes the language of all words e...
Windfall asked 11/3, 2013 at 11:30

2

Solved

The regular definition for recognizing identifiers in C programming language is given by letter -> a|b|...z|A|B|...|Z|_ digit -> 0|1|...|9 identifier -> letter(letter|digit)* This defi...
Oxy asked 19/2, 2013 at 9:19

4

How do you say δ: Q × Σ → Q in English? Describing what × and → mean would also help.
Chard asked 14/2, 2013 at 7:51

1

Solved

I am asked to show DFA diagram and RegEx for the complement of the RegEx (00 + 1)*. In the previous problem I had to prove that the complement of a DFA is closed and is a regular expression also, s...
Chartulary asked 10/2, 2013 at 21:22

3

Solved

Using pumping lemma, we can easily prove that the language L1 = {WcW^R|W ∈ {a,b}*} is not a regular language. (the alphabet is {a,b,c}; W^R represents the reverse string W) However, If we replace ...
Damaris asked 25/1, 2013 at 11:54

3

I'm having trouble articulating the difference between Chomsky type 2 (context free languages) and Chomsky type 3 (Regular languages). Can someone out there give me an answer in plain English? I'm...
Intoxicating asked 18/7, 2012 at 19:57

1

What is the direct and easy approach to draw minimal DFA, that accepts the same language as of given Regular Expression(RE). I know it can be done by: Regex ---to----► NFA ---to-----► DFA ---to--...
Smackdab asked 7/12, 2012 at 20:53

1

I have this language L that contains only one string: written more concisely This string has 2(2^n−1) characters and I want to reduce it. I was thinking of using intersection, if i can find some...
Vermillion asked 13/12, 2012 at 19:7

1

Solved

I need some help with a pumping lemma problem. L = { {a,b,c}* | #a(L) < #b(L) < #c(L) } This is what I got so far: y = uvw is the string from the pumping lemma. I let y = abbc^n, n is t...
Heterogamete asked 16/11, 2012 at 0:13

1

As we know, given a regular grammar, we have algorithm to get its regular expression. But if the given grammar is context-free grammar (but it only generates regular language), like S->aAb A->...
Manatarms asked 16/5, 2012 at 2:17

5

Solved

<?php $string = 'user34567'; if(preg_match('/user(^[0-9]{1,8}+$)/', $string)){ echo 1; } ?> I want to check if the string have the word user follows by number that can be 8 symbols m...
Fargone asked 12/6, 2012 at 15:21

© 2022 - 2024 — McMap. All rights reserved.