Create a tree that models of the scenario

Assignment Help Database Management System
Reference no: EM13772366

Weekly tasks or assignments (Individual or Group Projects) will be due by Monday and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus. NOTE: All submission posting times are based on midnight Central Time.
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.

Reference no: EM13772366

Questions Cloud

Explain the key characteristics of a stakeholder : Describe the key characteristics of a stakeholder and determine all the stakeholders within the PharmaCARE scenario. Analyze the human rights issues presented by PharmaCARE's treatment of the Colberia's indigenous population versus that of its exec..
Health insurance companies are oligopolies : Health insurance companies are oligopolies, and one of the criticisms of oligopolies is the adverse impacts these firms have on income distribution. Discuss in relation to the policies and practices of health insurance companies.
Problems related to distance between the earth and the moon : What causes the Doppler effect and why is it so important for the study of astronomy?
Create a tree that models of the scenario : 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.
Create a tree that models of the scenario : 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.
Do you feel that you have become a better reader and writer : Do you feel that you have become a better reader and writer through this course? If so, in what ways? If not, why?
History of the pennsylvania and auburn corrections systems : Give the history of the Pennsylvania and Auburn corrections systems, and weigh the pros and cons of each
Perfect competition is a model : Perfect Competition is a model of which examples are few and far between; yet economists love to discuss this model. Obviously this model is not suitable for analyzing healthcare economics. Discuss.
Discuss the concept of corporate criminal liability : Discuss the concept of corporate criminal liability and its impact on corporate operations, with a focus on whether or not the attribution of "personhood" is good for corporations

Reviews

Write a Review

Database Management System Questions & Answers

  Create a stack of single byte entities

Write in assembler a program that will create a stack of single byte entities and have the following operations: push and pop.

  Create class diagram

Draw a UML class diagram that models the aspects of job agencies that are described below.

  Configuring the authentication mode in ssms

Launch SSMS - Right-click on the SQL Server instance you want to configure and select Properties - you will configure the authentication mode for the SQL Server instance. You will ensure that the authentication mode is set to mixed mode so that the..

  Given the following sample database diagram do the

given the following sample database diagram do the followingcreate the needed tables in the sql server environment just

  Write an essay on marketing management

The customer is always right -The customer doesn't know what's best. It's the baker's (marketer's) job to educate him. The above statements succinctly point out a subtle battle which rages within the marketing discipline.

  Create a new table named sportinggoods in database

Create a new table named SportingGoods to contain the columns PartNum, Description, OhHand, Warehouse, and Priced for all rows in which the item class is SG.

  Define the database life cycle

Per the text, the Database Life Cycle includes the Database Initial Study, Database Design, Implementation and Loading, Testing and Evaluation, Operation, and Maintenance and Evolution phases.

  Define the concept of reduction factor

Summarize briefly how to make use of indexes such as B+ tree or a hash indexes in selection, projection, and join operations?

  How might the tables be related to one another

What tables would you create, and what would the table components be and How might the (independent) tables be related to one another?

  Find bcnf decomposition of relation schema

Consider a relation schema r(A,B,C,D,E, F) and a set of functional dependencies {A BCD,BCDE,BD,DA}.  Determine whether or not (A,E, F) is in BCNF and justify your answer. If (A,E, F) is not in BCNF,find a BCNF decomposition of it.

  Explaining cardinality of a relationship

What is meant by cardinality of a relationship? Your answer requires to be thorough and specific. Be sure to include the two types of cardinality

  Find all non-trivial dependencies

Compute the closure sets of R, find all non-trivial dependencies and what are the candidate keys of R?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd