Quiz_Lessons4-5

.docx

School

Pennsylvania State University, World Campus *

*We aren’t endorsed by this school

Course

230

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

docx

Pages

3

Uploaded by MegaPrairieDog4086

IST 230 Quiz Lessons 4 – 5 – Questions are worth 10 points each Chapter 4 1. Evaluate the following Boolean expression with x = y = 1 and w = z = 1. ( z + x ) + ( 1 + wy ) x=y=1 + w=z=0 x = y = 0 + w = z = 1 ¿ 1+(0)(1) ( 1 + 0 )+( 1 + ( 1 ) ( 0 ) ) 2+2 1+( ¿) ( 1 ) +1 0+2=2 ( 0 + 1 ) +¿ 0+1=1 ( 1 ) +1 0+1=1 2. Give a Boolean expression specified by the input/output table below for the function f(x,y,z). Use the sum of minterm expression described in the text. x y z f(x,y,z) 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 X 1 y 1 z + x 1 yz + xy 1 z 1 + xyz 3. Suppose x, y, and z are Boolean variables. Explain why the following expression is or is not in Disjunctive Normal Form (where juxtaposition is used to indicate Boolean multiplication): ( x + y + z ) ( z + xyz ) Not Disjunctive, because both expressions that are being multiplied are not single literals Chapter 5 4. Draw the arrow diagram and the matrix representation for the following relation on the set {1, 2, 3, 4}: R = { (1,3), (1, 4), (2, 1), (3,2), (3, 4), (4,2)}. 1 1 1 2 3 4
2 2 1 0 0 1 1 3 3 2 1 0 0 0 4 4 3 0 1 0 1 4 0 1 0 0 5. Suppose A = {1, 2, 3, 4}. Let S and R be relations on A defined as follows: S = { (1, 1), (1, 3), (2, 3), (3, 4), (4,1) } R = { (1, 4), (2, 2), (3, 2), (4, 2) } a. Explain why the ordered pair (1,2) is or is not in the relation S o R. a. (1,2) is not a relation. It is not in S or R b. Explain why the ordered pair (2,3) is or is not in the relation S o R. a. (2,3) is a relation. It falls in S 6. The table below shows the database of vehicles on a used car lot. It's actually just a portion of the list, but for the purposes of this question, assume it lists all the vehicles. Category Make Color Year Sedan Chevrolet Yellow 2008 Truck Ford Black 2013 SUV Ford Silver 2013 Sedan Toyota Maroon 2003 Sedan Honda Blue 2002 Minivan Honda Blue 2010 Sedan Chrysler Red 2014 a. Give a key for this database. a. {Category, Year} b. Show the results of the operation SELECT[Category ="Sedan" ^ Year > "2008"]. a. Sedan Chrysler Red 2014 c. Show the results of the operation PROJECT[Color]. a. Yellow, Black, Silver, Maroon, Blue, Blue, Red d. Show the results of the operation SELECT[Make = "Ford"] followed by PROJECT[Color]. Express in English what question this combination of queries is asking. a. SELECT [Make = “Ford”] is the vehicle type. PROJECT [Color] asks for the color attribute(s) e. What operation or operations should be performed if you wanted to know which vehicles were made by Honda and made after 2005? a. SELECT [Category = “Honda” ^ Year > “2005”] 7. Suppose A = {1, 2, 3}, and suppose the relation R on A is defined by R = { (1,1), (1,2), (2,3), (3,3) }. List as a set of ordered pairs the transitive closure of R.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help