Find a phrase-structure grammar for each of these languages.
a) the set consisting of the bit strings 10, 01, and 101
b) the set of bit strings that start with 00 and end with one or more 1s
c) the set of bit strings consisting of an even number of 1s followed by a final 0
d) the set of bit strings that have neither two consecutive 0s nor two consecutive 1s
Want to see the full answer?
Check out a sample textbook solutionChapter 13 Solutions
Discrete Mathematics and Its Applications ( 8th International Edition ) ISBN:9781260091991
Additional Math Textbook Solutions
Mathematics for Elementary Teachers with Activities (5th Edition)
Calculus Volume 2
Basic College Mathematics (12th Edition)
Numerical Analysis
Thinking Mathematically (6th Edition)
Finite Mathematics for Business, Economics, Life Sciences and Social Sciences Plus NEW MyLab Math with Pearson eText -- Access Card Package (13th Edition)
- Suppose that a password for a computer system must have at least 6, but no more than 9 characters, where each character in the password is a lowercase English letter, or an uppercase English letter, or a digit, or one of the five special characters * , < , > ! and # (a) How many different passwords are available for this computer system? (b) How many of these passwords contain at least one occurrence of at least one of the five special characters? (c) Using your answer to part (b), determine how long it takes a hacker to try every possible password, assuming that it takes one microsecond for a hacker to check each possible password. Please solve all 3 sub questionsarrow_forwardTransform the grammar with productions S→abAB A→aAB/∊ B→bbA into Chomsky normal formarrow_forward) Suppose in a university, each subject offered to students has a subject code consisting of four letters followed by four digits. i. How many different subject codes are possible? ii. How many subject codes could begin with CS and end in 3 or 2? iii. How many subject codes are possible in which all the letters and the digits are distinct?arrow_forward
- Let E be the set of 26 English letters. Find the number of 5-letter words (including nonsensical words) that can be formed from E such that the first and last letters are distinct vowels and the remaining three are distinct consonants.arrow_forwardConstruct npda's that accept the following languages on Σ = {a, b, c} a) L = {a^n b^2n : n ≥ 0}. b) L = {wcw^R: w ∈ {a , b}*}.arrow_forwardConsider a language which uses the following set of characters: Prefix set: {a e i} Small set: { bc d} Large set: { B C D} Punctuation set: { x y } This language must follow the following rules: i. A series must start with a prefix character ii. A series must end with a punctuation character iii. A caries can have up to but no more than 7 characters, excluding prefix and punctuation characters. iv. A series may not have more small characters than large characters, unless the series has a small character that immediately precedes the final punctuation character Which one of the following series do not follow all the rules of the language defined above?arrow_forward
- How many diffrent strings can be formed by rearanging the letters in the word ABABA?arrow_forwardAssume that product codes are formed from the letters T, Z, Q, V, Y, U, and X, and consist of 6 not necessarily distinct letters arranged one after the other. For example, TTXUVZ is a product code. (1) How many different product codes are there? (2) How many different product codes do not contain Q? (3) How many different product codes contain exactly one U?arrow_forwardAssume that product codes are formed from the letters A, B, C, D, and E, and consist of 5 not necessarily distinct letters arranged one after the other. For example, AABCC is a product code. How many different product codes are there? How many different product codes do not contain A? How many different product codes contain exactly one B?arrow_forward
- What is the bit string corresponding to the symmetric difference of two sets?arrow_forwardUse Venn diagrams to verify the distributive laws.arrow_forwardSuppose that in a particular class of 200 students, 31 of them plan on majoring in math, 27 plan onmajoring in history, and 18 plan on double majoring in math and history. How many want to major inexactly one of psychology or math? (Hint: Look at the Venn diagram and figure out which regionscorrespond to “exactly one”; do not try and write the set down!)arrow_forward
- Discrete Mathematics and Its Applications ( 8th I...MathISBN:9781259676512Author:Kenneth H RosenPublisher:McGraw-Hill EducationMathematics for Elementary Teachers with Activiti...MathISBN:9780134392790Author:Beckmann, SybillaPublisher:PEARSON
- Thinking Mathematically (7th Edition)MathISBN:9780134683713Author:Robert F. BlitzerPublisher:PEARSONDiscrete Mathematics With ApplicationsMathISBN:9781337694193Author:EPP, Susanna S.Publisher:Cengage Learning,Pathways To Math Literacy (looseleaf)MathISBN:9781259985607Author:David Sobecki Professor, Brian A. MercerPublisher:McGraw-Hill Education