(10pts) A language has alphabet (a, b, and it consists of all words with at mos two "b"s. For example, the words aababaa, ababaaaaa, and aaaba are in the age, while bababa, bbaab, and baa...
Consider the language ins, for example, the words 1, 11 and 11111111, but neither 111 nor 1111111111 1. Prove that L is not context-free. 2. Draw a standard Turing machine with a two-way tape that decides L, using only ?-(L B} as tape alphabet. Very briefly explain how your machine works For every state or group of related states, your explanation should say in a few words (e.g. move back to start of tape" or "replace every blank by 1")...
Write Java code to implement a FSM machine that recognizes the language for the alphabet {a,b,c} consisting of all strings that contain two consecutive c's and end with b. Your FSM program should include the following three static methods (Java) or functions (C): a. int nextState(int state, char symbol) A state-transition function that returns the next state based on the current state and an input symbol. This function should also return -1 when an invalid input character is detected. State...
Part B - Automata Construction Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of all strings such that the number of 0s is divisible by 2 and the number of 1s is divisible by 5. Your DFA must handle all intput strings in {0,1}*. Here is a methodical way to do this: Figure out all the final states and label each with the shortest string it accepts, work backwards from these states to...
In C language This program reads in a series of words. All words consist of only lower-case letters ('a' through 'z'). None of the words entered will be longer than 50 letters. The program reads until ctrl-d (end-of-file), and then prints out all the lower-case letters that were missing in the input or a statement indicating the input has all the letters. Two executions of the program are shown below. Enter your input: the quick brown fox jumps over the...
X Company has two production departments, A and B. The following is budgeted information for all of its products in 2019, and actual information for one of them, Product X: Department A All Products Product X Overhead $2,000,000 -- Direct labor hours 40,000 894 Machine hours 100,000 1,000 Units produced 54,000 700 Department B Overhead $2,100,000 -- Direct labor hours 60,000 202 Machine hours 140,000 890 Units produced 46,000 700 Using a single-driver allocation system, with machine hours as the...
X Company has two production departments, A and B. The following is budgeted information for all of its products in 2019, and actual information for one of them, Product X: Department A All Products Product X Overhead $6,800,000 -- Direct labor hours 50,000 847 Machine hours 110,000 1,000 Units produced 58,000 640 Department B Overhead $2,200,000 -- Direct labor hours 60,000 260 Machine hours 140,000 840 Units produced 34,000 640 Using a single-driver allocation system, with machine hours as the...
X Company has two production departments, A and B. The following is budgeted information for all of its products in 2019, and actual information for one of them, Product X: Product X All Products $6,900,000 60,000 100,000 58,000 724 1,000 770 Department A Overhead Direct labor hours Machine hours Units produced Department B Overhead Direct labor hours Machine hours Units produced $2,000,000 60,000 130,000 42,000 286 800 770 Using a single-driver allocation system, with machine hours as the driver, how...
X Company has two production departments, A and B. The following is budgeted information for all of its products in 2019, and actual information for one of them, Product X: Department A All Products Product X Overhead $7,900,000 -- Direct labor hours 60,000 788 Machine hours 120,000 1,080 Units produced 58,000 560 Department B Overhead $1,900,000 -- Direct labor hours 40,000 142 Machine hours 130,000 900 Units produced 46,000 560 Using a single-driver allocation system, with machine hours as the...
X Company has two production departments, A and B. The following is budgeted information for all of its products in 2019, and actual information for one of them, Product X: Department A All Products Product X Overhead $5,800,000 -- Direct labor hours 50,000 825 Machine hours 100,000 1,070 Units produced 59,000 810 Department B Overhead $1,900,000 -- Direct labor hours 40,000 159 Machine hours 120,000 820 Units produced 44,000 810 Using a single-driver allocation system, with machine hours as the...
X Company has two production departments, A and B. The following is budgeted information for all of its products in 2019, and actual information for one of them, Product Department A Product X Overhead - - All Products $4,300,000 40,000 110,000 51,000 846 1,090 770 Direct labor hours Machine hours Units produced Department B Overhead Direct labor hours Machine hours Units produced $1,800,000 40,000 120,000 44,000 176 900 770 Using a single-driver allocation system, with machine hours as the driver,...