Make your own free website on Tripod.com

My Logo

welcome to doaanos's                          welcome to ahgaffia's              in this page you will see samples of exams in ahgaff university ....

Samples Of Exams For The Previous Years

Ahgaff University

Girls College

Computer Science

      Ahgaff Uni. Logo


The First Year

 

 


The Second Year

 

    First Semester   

   Data Structure  

  First Month Test For The First Semester                                                             Academic Year 2003/2004

Date : 3/11/2003                       Time :-  1.5 Hours

Examiner : Abdullah Sebty

answer any four of the following questions :

1- show the representation of the following polynomial using both a multidimensional array and an array of structures : 3x3y2 + 4x2y + 5x

2- show all the steps of "Bubble Sort " algorithm to sort the following list of numbers :

69 , 17 , 85 , 13 , 45 , 93 .

3- show how stack is used to convert the infix expression ( P + Q ) / ( R - S ) * T + K to postfix form.

4- state two applications of queue. write functions to implement add and delete operations on "Circular Queue ".

5- Define "Recursive Function " . Let n be an integer and suppose f (n) is recursively defined by :           

F(n)=
 

3n                                       if n<5

 

 

2 f(n-5)+7                          other wise

 

 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  Second Month Test For The First Semester                                                       Academic Year 2003/2004

Date : 29/12/2003                       Time :-  1.5 Hours

Examiner : Abdullah Sebty

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 1- write algorithm for any two of the following :

      a. finding the maximum MAX of the numerical values in a SLL (single linked list ).

      b. display the elements of the SLL in reverse order using a stack.

      c. swap the information of two adjacent elements in a SLL.

 2- answer any two from the following :

      a. consider the following DLL (doubly linked list). show all steps ,how deletion process is carried out for deleting  a node X.

                                   nodes structure                                      

      b. write a function to add a node after a given node in a DLL..

      c. what are the differences between each of the following :

                      1) an array and a linked list .

                      2) a singly linked list and doubly linked list.

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  Final Exam For The First Semester                                                             Academic Year 2003/2004

Date :22/1/2004                       Time :-   3 Hours

Examiner : Abdullah Sebty

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

notes:

1- all questions are compulsory.

2. read the questions fully and carefully before answering.

Q1)- explain the algorithm for evaluation of a postfix expression.

Q2)- given an integer k , write algorithm which deletes the kth  elements from a SLL.

Q3)- in the linear queue insert and delete algorithms what are the conditions for :

      i- the queue is filled.

     ii- the queue is initially empty.

    iii- the queue has only one element.

Q4)- a binary tree T has the inorder and preorder traversals of T yields the following sequences of nodes :

                                                           Inorder : E , A , C , K , F , H , D , B ,G

                                                           Preorder : F , A , E , K , C , D , H , G , B

      i- draw the tree T.

     ii- find postorder traversal of T . 

Q5)- suppose the following ten numbers are inserted in order into an empty binary search tree T 

                                44 , 33 , 11 , 55 , 77 , 90 , 40 , 22 , 60 , 66

      i- draw the tree T.

     ii- delete a node 77 from the tree  T.

    iii- what the level of the tree T.

Q6)- consider the following directed graph G :

graph

      i- find out breath-first & depth-first traversals of G starting at vertex D.

     ii- find the adjacency matrix A of the graph G.

    iii- identify the cycles in this graph.

Q7)- write short notes on :

      i- hashing techniques.

     ii- complete graph.

    iii- complete binary tree. 

 

*****************************************************************************************************************************************************************

 

   Discrete Mathematics  

  First Month Test For The First Semester                                                             Academic Year 2003/2004

Date : 5/11/2003                       Time :-  1.5 Hours

Examiner : Alwi A. Assagaff

attempt all questions :

Q1)- let ( I ) be the set of integers , let us define the relation R on ( I ) by xRy iff "x-y is divisible by 3 " for x,y I . show that R is an equivalence relation .

Q2)- show that the set I of all integers with the binary operation define by a * b = a + b + 1 a,b I is an belian group.

Q3)- if Un is define by recursively by the rules : 

           U1=3 , U2=5 , Un=3Un-1 - 2Un-2   (n≥3)

           by mathematical induction show that Un = 2n + 1 for all n is a positive integer. 

Q4)-   i) write the truth table for the compound statement .

                             [ q ↔ ( r → ~ p ) ] v [ ( ~ q → p ) ↔ r ] , where p,q and r are propositions .

          ii) using laws of logic to prove :

                             [ p ^ (~ p v q)] v [ ( ~ p ^ q ) v ~ q ] ≡ T , where p and q are propositions.

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  Second Month Test For The First Semester                                                             Academic Year 2003/2004

Date :     /     /  2003                       Time :-  1.5 Hours

Examiner : Alwi A. Assagaff

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Solve all questions :

Q1)- consider the linear congruence  15 X ≡ 12 ( mod 21 )

          i) is the linear congruence has solution ? justify ?

         ii) if it has solution . how many solutions ?

        iii) if its exist , find the solutions .

Q2)- show that the D110 set of all divisors of 110 is formed a Boolean algebra the operations defined as 

                                                           a + b = LCM [ a , b ]

                                                           a * b =  GCD ( a , b )

                                                           a` = 110 / a

Q3)- find the greatest common divisors of a = 3367 and b = 3219 , write the numbers in the conical form ,also find the least common multiple of a and b.

Q4)- i) if a b ≡ a c ( mod m ) and a  ≡/≡ 0 ( mod m ) , prove that b ≡ c ( mod m )

        ii) find the value of     a) Ø ( 126 )                      b)  Ø ( 6125 )

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  Final Exam For The First Semester                                                             Academic Year 2003/2004

Date :19/1/2004                       Time :-   3 Hours

Examiner : Alwi A. Assagaff

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

solve any five questions :

Q1)- a) simplify the propositions :

                                       i) p v ( p ^ q )                               ii) ~ ( p v q ) v ( ~ p ^ q )      

         b) let R be the set of all real numbers and * a binary operation on R defined by a * b = a + b + a b. determine the identity element in R and determine the inverse of a .

         c) write the number a = 4950 in canonical form.

Q2)- a) prove that the congruence relation is an equivalence relation . define in integer numbers

         b) let P be an odd prime number , then prove that Ø ( 2P ) = Ø ( p ).

         c) find the greatest common divisor of 308 and 136 and express it in the form : 308 x + 136 y .

Q3)- a) solve the linear congruence 16 x ≡ 25 ( mod 19 )

         b) show that D70 ( D70 is the set of all divisors of 70 ) is formed a Boolean algebra, the operations defined as :

                                                                              a + b = LCM [ a , b ]

                                                                              a * b = GCD ( a , b )

                                                                                    a` = 70 / a

         c)- find the LCM [ 50 , 75 ]

Q4)- a) prove by principle of mathematical induction that 72n + 16n - 1 is divisible by 64 for all n ≥ 1.

         b) if ( a , b ) = 1 , show that ( a+b , a-b )= 1 or 2 

         c) find the value Ø ( 768 ) 

Q5)- a) if ab ≡ ac ( mod p ) and a ≡/≡ 0 ( mod p ) where p is a prime number , then b ≡ c ( mod p ) .

         b) show that the set of all even integers with zero is an a belian group with respect to addition.

         c) find the truth table of the proposition [ q  ( r → ~ p ) ] v [ ( ~ q → p ) ↔ r ]

Q6)- a) solve the congruence  3 x ≡ 12 ( mod 18 )

         b) show that the relation of divisibility in the set of natural numbers is :

                             i) reflexive 

                            ii) not symmetric 

                           iii) transitive 

         c) find Ø ( 6125 )

 

*****************************************************************************************************************************************************************

 

       Digital Logic       

  First Month Test For The First Semester                                                             Academic Year 2003/2004

Date : 9/11/2003                       Time :-  1.5 Hours

Examiner : Alwi S. Al_aidarous

Answer any four :

Q1) Answer any three of the following :

         a)- what is the largest binary number that can be obtained with 14 bits ? what is it's decimal equivalent ?

         b)- convert the following binary numbers to decimal :

                           101110      -       1110101.11        -        1101.10100

         c)- convert the following numbers with the indicated bases to decimal :

                            ( 12121 )3   ;    ( 4310 )5     ;      ( 50 )7      ;

         d)- convert the following  decimal numbers to binary :

                               673.23     ;     104             ;        1998      ;

Q2) a)- perform the following division in binary   11111111 / 101

       b)- perform the subtraction with the following binary numbers using complement method of subtraction :

                                  i)  11010 - 10000                         ii) 100 - 110000

Q3) design a logic circuit after simplified the truth table using karnaugh map, the logic circuit has four inputs and one output, the output should e high for all inputs states except the following :

                   0110       ;       0111      ;       1010    ;      1100      ;      1101      ;      1110

Q4) prove that : 

       a) A + A.B + A.B = A + B

       b) A.B.C + A.B.C + A.B.C + A.B.C = A.B + B.C + C.A

       c) 

Q5) draw the logic circuit to implement : F = A B C + B C using only NAND gates.

Q6) draw the logic circuit and construct the truth table for : ( A  B ) + ( X + Y )

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  Second Month Test For The First Semester                                                             Academic Year 2003/2004

Date :  23 / 12  /  2003                       Time :-  1.5 Hours

Examiner : Alwi S. Al_aidarous

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Answer all questions :

Q1) write one or two lines about any five of the following using logically words :

        i) latch         ii) toggle      iii) clock        iv) setup time    v) RC circuit      vi) race condition     vii) level clocked

Q2) a)- construct D-type flip flop using NAND gates only ( do not use NOT gate )

       b)- complete he time diagram to show the output ( Q ) of D-type input as follows :

                                                                                      timing diagram

Q3) a)- construct a truth table for the circuit shown :

       b)- complete the time diagram to show the response of the Q output of the gated latch to the input wave forms shown. the latch is initially set.

Q4) a)- using karnaugh map simplified and draw the logic circuit :

 

    C D C D C D  C D
A B 1 1 1
A B 1
A B X X X X
A B 1 X X

       b)- complete the time diagram to show the response of the J K master - slave flip flop to the input wave forms shown . the flip flop is initially reset .

 

 

                                                                          

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  Final Exam For The First Semester                                                             Academic Year 2003/2004

Date :24 / 1 / 2004                       Time :-   3 Hours

Examiner : Alwi S. Al_aidarous

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Notes :

 - draw net sketch if there is a need.

 - do not use pencil

 - marks for each question on the right side.

Answer ALL questions :

Q1) a)- add ( 473 )8 and ( 715 )8 without converting to decimal.          [ 2 marks ]

       b)- convert the binary number 1011101.101 to decimal.               [ 2 marks ]

       c)- convert decimal 632.16 to binary.                                               [ 2 marks ]

       d)- convert the hexadecimal F3A7C2 to binary and octal.             [ 2 marks ]

       e)- perform the following :

             i) multiplication : 1101 * 111                                                    [ 2 marks ]

            ii) division : 11011 / 011                                                             [ 2 marks ]

           iii) subtraction (using compliment method ) : 1001 - 1110     [ 2 marks ]

Q2) prove the Boolean theorem x + 1 = 1 by using postulates of Boolean Algebra       [ 4 marks ] 

Q3) prove that  X Y + X Y + X Y = X + Y                                                 [ 4 marks ]

Q4) draw the logic circuit after simplifying it using Karnaugh map :

 F = A B C D + A B C D + A B C D + A B C D + A B C D + A B C D + A B C D + A B C D         [ 4 marks ] 

Q5) write short notes about the following ( any THREE ) : 

                    i) propagation delay time    ii) binary adders    iii) counters        iv) D latch flip flop                                    [ 12 marks ] 

Q6) complete the timing diagram in figure below :                                                        [ 5 marks ] 

 

Q7) complete the time diagram , the latch is initially set :                                       [3 marks ] 

Q8) complete the time diagram for J K Master - Slave flip flop, the flip flop is initially reset :     [ 4 marks ] 

 

 

 

 

 

 

 

 

 

 

 

 

 

*****************************************************************************************************************************************************************