18 views

Uploaded by Haire Kahfi Maa Takaful

final exam for janurary 2012 csc510

- TR_2007_1
- السلم المنورق Al Sulam Al Munawraq in Logic
- Disembodied technological change with several factors
- wingett te4 lp
- 1136 four year plan
- Graphing Function
- 10 Sudoku
- Untitled
- QUARTERLY EXAM 1_advanced Algebra_HS4
- 5 global education units
- HCG_Ch2-3
- Transformations of Graphs
- 08-nested_quantifiers
- bonkoski lesson plan dec 4
- SOLUTION Test1 July2013 i Learn
- Assignment 1 Video
- Control Task
- seminar 8
- TOS First Quarter Gen Math 11
- 1_Sets

You are on page 1of 6

CS/JAN 2012/CSC510/ITC430

INSTRUCTIONS TO CANDIDATES 1. 2. 3. This question paper consists of eight (8) questions. Answer ALL questions in the Answer Booklet. Start each answer on a new page. Do not bring any material into the examination room unless permission is given by the invigilator. Please check to make sure that this examination pack consists of: i) ii) the Question Paper an Answer Booklet-provided by the Faculty

This examination paper consists of 6 printed pages

Hak Cipta Universiti Teknologi MARA CONFIDENTIAL

CS/JAN 2012/CSC510/ITC430

p : You drive over 90 kilometers per hour. q : You get a summon for speeding. Write these propositions using p and q and logical connectives. i) ii) iii) You get a summon for speeding, but you do not drive over 90 kilometers per hour, Whenever you get a summon for speeding, you are driving over 90 kilometers per hour, If you do not drive over 90 kilometers per hour, then you will not get a summon for speeding. (6 marks)

b)

Write the negation of the following statements: i) ii) You can access the website only if you pay a subscription fee. Jamal knows Java and C++. (4 marks)

c)

)) -

QUESTION 2 a) Write the negation of the following quantified statements. Move -i as far inside the predicate as possible.

i)

ii)

3x [Q(x) v (-P(x))]

BxVyVz [(F(x,y) A G(X,Z)) - H(y,z)] (6 marks)

b)

Express each of these quantifications in English. i) ii) 3x(S(x) A -.M(x)), where domain x consists of all people; S(x): x is a student in your school and M(x): x can speak Bahasa Malaysia. Vx G Z Vy e Z (x + y Z) { Z is the set of integers } (4 marks)

CONFIDENTIAL

CONFIDENTIAL c)

CS/JAN 2012/CSC510/ITC430

Express each of these statements using quantifiers and predicates with more than one variable. i) A man qualifies for the marathon if his best previous time is less than 3 hours and a woman qualifies for the marathon if her best previous time is less than 3.5 hours. Everyone in your class has either telephoned AN or sent him an e-mail message. (6 marks)

ii)

QUESTION 3 a) If n is an even integer, then i) ii) iii) iv) Prove that n2 is even. Prove that the product of an even integer and any integer is also even. Prove that the sum of three even integer is also even. Hence prove that 9n2 + 3n - 2 is even. (8 marks) b) Give the simplest possible conclusion for arguments given below. Show all your steps. The program is running if and only if the computer is working. The computer is working or the power is off. The power is on. (4 marks) QUESTION 4 a) Use set builder notation to give a description of the set shown below. S b) c) ={3,6,9}.

Obtain the power set P(S) for the set given in (a). What are the elements of the set A ={ (x,y) | x,y e Z and x2 + y2 < 4 } , and what is its cardinality? (6 marks)

d)

A function assigns to each positive integer its smallest decimal digit. i) ii) Find the domain and range of the function. Is this function onto? Is it one-to-one? Explain your answer. (6 marks)

CONFIDENTIAL

CONFIDENTIAL

CS/JAN 2012/CSC510/ITC430

QUESTION 5 a) Provide a counterexample to show that the relation R = { ( x , y ) G R2| x 2 > y } is not transitive. (4 marks) b) Let R be the relation on the set of all people who live in Seri Iskandar. R = {{x,y) | x l i v e s w i t h i n a k i l o m e t e r of y }.

QUESTION 6 a) Draw the state diagram for the DFSA given by the state table below. Final states are s0 S3 and s 4 .

Input State

0

So

Si Si

1

s2

Si

s3 s4

S5 S4 S5

s2

S3

s4 s4 s4 s4

(5 marks)

s4

S5

b)

Construct a deterministic finite-state automaton that recognizes any input string that contains either all 1s or all Os. (6 marks)

CONFIDENTIAL

CONFIDENTIAL QUESTION 7 a)

CS/JAN 2012/CSC510/ITC430

Study the grammar given below and answer the following questions. G = { V , T , S , P } with Vocabulary, v = { a , b , s , A } , Terminals, T = { a , b , } , Starting symbol, s, and

i) What is the type of the above grammar? State your reason. (2 marks) ii) What is the language L(G) generated by G ? (3 marks) b) Develop a grammar that generates the language {1, 11, 1111, 11111111 } over (5 marks) QUESTION 8 a) Compute the weakest precondition for the following program statements based on the given post condition. The assertions are printed in bold.

i) ii) X := z + 1 ; y := x + y {y > 5}

{0,1}.

S l := s i + s 2 ; 52 : = S2 + S 3 ; 53 : = S3 + 6 ; i : = i +1 ; {sl= i3 ; s2=(i+l)3 i3 ; s 3 = 6* ( i + 1) }

(7 marks)

CONFIDENTIAL

CONFIDENTIAL

CS/JAN 2012/CSC510/ITC430

b)

show that a = dq + r is the loop invariant. (4 marks) c) Proof the correctness of the program segment if x < 0 then x:= 0 with respect to the precondition { } and the postcondition x 0. (5 marks)

CONFIDENTIAL

- TR_2007_1Uploaded bySubhajit Chakraborty
- السلم المنورق Al Sulam Al Munawraq in LogicUploaded byHorace Daniel
- Disembodied technological change with several factorsUploaded byAnonymous sGLwiwMA4
- wingett te4 lpUploaded byapi-317475882
- 1136 four year planUploaded byapi-300174466
- Graphing FunctionUploaded byyeunu117
- 10 SudokuUploaded byTushar K Gohel
- UntitledUploaded byapi-168512039
- QUARTERLY EXAM 1_advanced Algebra_HS4Uploaded bysakyamath
- 5 global education unitsUploaded byapi-236272918
- HCG_Ch2-3Uploaded byPham Van Hai
- Transformations of GraphsUploaded bymomathtchr
- 08-nested_quantifiersUploaded byAin Sha
- bonkoski lesson plan dec 4Uploaded byapi-286186447
- SOLUTION Test1 July2013 i LearnUploaded byEsafirah Zakaria
- Assignment 1 VideoUploaded byLyLohL
- Control TaskUploaded byJuan Antonio Monaco Nuñes
- seminar 8Uploaded bydanut168
- TOS First Quarter Gen Math 11Uploaded byRey Anthony B. Niere
- 1_SetsUploaded bykkrsmr
- Sequencing (Models) - LectureUploaded bymanendra chopra
- Average Rate of ChangeUploaded byMuhamad Nazery Mat Nor
- Latihan Pemrograman DasarUploaded byDwiki Darmawan
- Discrete MathematicsUploaded byimbanooobs23
- 22trans3Uploaded byPotnuru Vinay
- College 3 (Planning)Uploaded bystaryk
- Lecture Notes 237Uploaded byjonathan
- Anne Dufourmantel, Blind DateUploaded byunderpuppy
- Activity on the NodeUploaded byallahmahdiali
- Deteccion de celo mediante acelerometros 3DUploaded byHugo Leonardo Rufiner

- CSC520 APRIL 2011 UITMUploaded byHaire Kahfi Maa Takaful
- CSC520 2014 JUNEUploaded byHaire Kahfi Maa Takaful
- PHI454_2013_01Uploaded byHaire Kahfi Maa Takaful
- PHI454_2013_01Uploaded byHaire Kahfi Maa Takaful
- CSC563_2014_01Uploaded byHaire Kahfi Maa Takaful
- Solution Test1 Qmt400Uploaded byHaire Kahfi Maa Takaful
- CSC662_2013_01Uploaded byHaire Kahfi Maa Takaful
- COWAY NEW PRICEUploaded byHaire Kahfi Maa Takaful
- LEC 02 02 Epistemology Islamic Perspective IIUM AzramUploaded byHaire Kahfi Maa Takaful
- Branches of Philosophy Part IIUploaded byHaire Kahfi Maa Takaful
- Surah Ad DhuaUploaded byHaire Kahfi Maa Takaful
- Agenda PerbincanganUploaded byHaire Kahfi Maa Takaful
- MAT423_2013_01Uploaded byHaire Kahfi Maa Takaful
- MAT423_2013_01Uploaded byHaire Kahfi Maa Takaful
- Topic2_ArrayBasedListUploaded byHaire Kahfi Maa Takaful
- Assign1 qmt400Uploaded byHaire Kahfi Maa Takaful
- mbo_kangUploaded byHaire Kahfi Maa Takaful
- HIBAH_KOSONGUploaded byHaire Kahfi Maa Takaful
- Solution Test1 Qmt400Uploaded byHaire Kahfi Maa Takaful
- Uitm CTU Past Year Exam PaperUploaded byAizuddinHakimBenny
- Print - How to Use BlueJUploaded byHaire Kahfi Maa Takaful
- Cyber TerrorismUploaded byHaire Kahfi Maa Takaful
- CSC435_12_JANUploaded byHaire Kahfi Maa Takaful
- CSC510Uploaded byHaire Kahfi Maa Takaful
- TEST2QMT400 sem1 2031_answer.docxUploaded byHaire Kahfi Maa Takaful
- CSC510Uploaded byHaire Kahfi Maa Takaful
- Topic 6 HashingUploaded byHaire Kahfi Maa Takaful
- Course Info Bab401Uploaded byHaire Kahfi Maa Takaful

- Bertrand Russell and LogicUploaded byJavier Ruiz de la Presa
- Pure Mathematics- Reasoning and LogicUploaded byKeithi-boo Green
- Why Knowledge is Merely True BeliefUploaded byἈρχεάνασσαΦιλόσοφος
- Logic and Sets MCQUploaded bylibranhitesh7889
- Meaning And Grammar - An Introduction to Semantics - Chierchia and McConnell-Ginet.pdfUploaded byHenrique dos Santos
- Meta ModelUploaded bysocratesathenes
- solution1-10Uploaded bytntxp256
- Minimal finite-state automaton associated with a sequential circuitUploaded byAnonymous vQrJlEN
- Ai Second AssignmentUploaded byPulkit Manchanda
- Situaation SemanticsUploaded bySara Eldaly
- Mathematical ReasoningUploaded bymoonstr
- ArgumentUploaded byJosé Miguel Najul
- Henry E. Allison - Kant’s Theory of Freedom (1990, Cambridge University Press)Uploaded bymontserratrrh
- Neutrosophic Decision Making Model of School ChoiceUploaded byDon Hass
- Mill DisplayUploaded bytobysvelnis
- TEST_NCERT1.pm.pdfUploaded bysuhail ahmad
- apostel-solution-ch2Uploaded byhamid
- APPLICATIONS OF LOGIC IN MEDICINE.pdfUploaded byPhuong Nguyen Le
- A Quick Tour of Logos: The Logical AppealUploaded bymoizrassiwala
- FTS Rapport PDFUploaded byviet122411
- Lab Manual Exp 1t05Uploaded bysridharanchandran
- Ecuaciones en Diferencias FinitasUploaded byEduardo Muller
- Tecuci-Overcoming_IA_Complexity.pdfUploaded byandreea_zgr
- Critical ThinkingUploaded byZarina Zahar
- stldUploaded byanjali1980
- 14.docUploaded byid7mi
- Relevant Costs for Decisions Part 2Uploaded bykhengmai
- Chapter01 Be A Life Long Learner.pdfUploaded bynkorelis
- Borromean KnotUploaded byroquefarran
- The Handbook of PragmaticsUploaded byJuba Lee