P4 project is posted in download file this needs to be incorperated in Project 5 is the assighnment so read the instructions and finish project 5 as discribed. I have also included the instruction pertaining to project 4 below!
 
Project 5
Task Background: This assignment is to include a revised version of parts I-IV from week 4, plus Part V, described below. In part V, you are asked to demonstrate the procedures of data-processing algorithms and discuss their runtime. This is project 5
Parts I-IV
Review and revise your Week 4 Individual Project as needed based on comments from your instructor. NOTE: Submit these parts again even if you made no changes were necessary from the previous project.
Part V
Algorithm Analysis
Consider searching algorithms on the following array of data:
[22 21 9 4 16 2 10 14 20 31 26 19 17 28 8 13]
Suppose you want to implement a searching algorithm to see if the data set contains the number 19. Demonstrate how the search would go if you used:
A sequential search
A binary search 
State the runtime for each of the searches, in this example, and for general data sets of size n. Address the issue of the order of the data in binary searching.
Suppose an algorithm that processes a data set of size 8 has a runtime of 72. The same algorithm has a runtime of 110 when applied to a data set of size 10; and when applied to a data set of size 20, it has a runtime of 420. Using big-O notation, state the runtime for this algorithm for the general case of a data set of size n. 
Suppose you develop an algorithm that processes the first element of an array (length of n), then processes the first 2 elements, then the first 3 elements, and so on, until the last iteration of a loop, when it processes all elements. Thus, if n = 4, the runtime would be 1 + 2 + 3 + 4 = 10. 
//////////////////////////////////////////////////////////////////////////////////////////////////
Instruction for P4 my completed paper is in the down load below

Task Background:  This assignment involves solving problems by using various discrete techniques to model the problems at hand. Quite often, these models form the foundations for writing computer programming code that automate the tasks. To carry out these tasks effectively, a working knowledge of sets, relations, graphs, finite automata structures and Grammars is necessary.
Part I: Set Theory

Look up a roulette wheel diagram. The following sets are defined:
A = the set of red numbers
B = the set of black numbers
C = the set of green numbers
D = the set of even numbers
E = the set of odd numbers
F = {1,2,3,4,5,6,7,8,9,10,11,12}
From these, determine each of the following:
A∪B
A∩D
B∩C
C∪E
B∩F
E∩F
Part II: Relations, Functions, and Sequences
The implementation of the program that runs the game involves testing. One of the necessary tests is to see if the simulated spins are random. Create an n-ary relation, in table form, that depicts possible results of 10 trials of the game. Include the following results of the game:
Number
Color
Odd or even (note: 0 and 00 are considered neither even nor odd.)
Also include a primary key. What is the value of n in this n-ary relation?
Part III: Graphs and Trees
Create a tree that models the following scenario. A player decides to play a maximum of 4 times, betting on red each time. The player will quit after losing twice. In the tree, any possible last plays will be an ending point of the tree. Branches of the tree should indicate the winning or losing, and how that affects whether a new play is made.
Part IV: Automata Theory, Grammars and Languages (There are 2 questions for this part)
(1) A gate with three rotating arms at waist height is used to control access to a subway in New York city. Initially, the arms of the gate are locked preventing customers from passing through. Unlocking the arms requires depositing a token in a slot, which allows the arms to rotate to a complete turn which allows one customer to push through and enter. Once the customer passes through the arms are then locked again until another customer deposits another token in the slot.
The gate has two states: LOCKED and UNLOCKED. It also has two inputs: TOKEN and PUSH. When the gate is locked, pushing the arm of the gate has no effect regardless of how many times it is pushed. The input TOKEN changes the state from LOCKED to UNLOCKED. When the gate is in the UNLOCKED state, inserting additional tokens has no effect on the state. But when in the UNLOCKED state, a PUSH input changes the state to LOCKED.

(i). Provide a transition table showing each state, the inputs, and the resulting new states for each input
(ii). Represent your transition table into a digraph (transition diagram) 

(2) Here is a context-free grammar that can be used to generate algebraic expressions via the arithmetic operators (addition, subtraction, multiplication, and division), in the variables p, q, and r. The letter E stands for expression:
Rule 1: E —› p
Rule 2: E —› q
Rule 3: E —› r
Rule 4: E —› E + E
Rule 5: E —› E – E
Rule 6: E —› E X E
Rule 7: E —› E/E
Rule 8: E —›(E)

(i). Use the above grammar to derive the string given by the mathematical expression E =  (p + q) X p – r X p/(q + q)
(ii). Provide a parse tree for this derivation.       

 
 


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"