You are on page 1of 14
Shahjalal University of Science and Technology Institute of Information and Communication Technology Masters in Information Technology (MIT) Ist Year Ist Semester Final Examination, June 2019 (Session: 2018-19) ‘Course: MIT 523 (Advanced Web Technologies) Credits: 3.0 Time: 3 hrs Total Marks: 100 Group A (Answer Any TWO) re a) List any four popular Internet applications. Contrast between static, dynamic and active Web documents with proper examples. [246] b) What are the different ways to organize the web pages according to their navigation order? Give examples. (6] ergme_ ©) Write short notes on : URL, Cross-Browser Compatibility, Firewall, Searcha[6] ) Explain the three key features of the Web: Portability, Scalability and User-Friendliness. (5] of a) How is XML compatible with CSS? How ia database testing used to validate content? (6] 44 2+J” 1) Consider the following code sample and do te following operations onthe code, g 49.6 OCTYPE himl>

This is a paragraph.

i. Add a title will show Advanced Web Technologies. ii, Change the text color of the paragraph to “blue”. iii, Change the font of the paragraph to “courier”. iv. Center align the paragraph. v. Change the text size of the paragraph to SOpx. ©) Modify the following code so that the server-side script capcha.php is called and the result is displayed on the CAPCHA label when the user clicks on REFRESH button. [6] Q3__ a) What is client-side script? Why should you use client-side script? If you know the id ofan HTML ‘element, how can you get the DOM address of that element in JavaScript? .[2+3+2] b) Write the differences between i) Java vs JavaScript and ii) Primitive Data vs Obj ‘whether the given user's input is a valid interger or not? (5+3] ©) Mention the two ways to embed a JavaScript script in an HTML documents. Wi JavaScript comments? [342] 4) Consider the HTML text element defined as , Write the JavaScript function to check whether the user's keystroke Allowed characters are all alphanumeric, comma, hyphen, apostrophe, [5] ject. How do you check hat are the two forms of name="'fullname" s is valid or invalid? Scanned with CamScanner Group B (Answer any TWO) os) List any four benefits of using the web-caching technique. [4] ro a) PHP is an Server. Q6 ) Explain the working principle of Web Search Engine to search any content from the Intemet with appropriate diagram. What are the alternate ways to search information from Internet other than the search engine? [6+3] : J ©) List the challenges faced by Web search engines to maintain or enhance the quality of their performance. Describe any three of them. (346) ~ ) Write short notes on Search Engine Optimization. [3] le Scripting language. Which are the alternates to this? What are the key features of choosing PHP other than these alternatives? [2+4] b) In PHP, there are two operators to concatenate two strings: dot (,) and plus (+). Which one is always safe and which is not? Justify your answer with proper example, [1+5] ©) How can a variable be tested to determine whether it is exist or carrying nothing in PHP? To display any string in PHP we may enclose it using single-quote or double-quote after the function ECHO. Is there any difference between these two ways? If yes, give examples. [3+4] d) Consider the following segment of a web page: Submit 5 ‘Write the PHP script that collects the data from the form, validates the input (check empty values) and store the data to the table COMMENTS (userid, blogid, co i ae eae logid, comments, ranks) under the database BLOGS, if the a) What is Cross-site Request Forgery password for the online users, [3+3] b) Can JavaScript get access to a user’s entire server against SQL Injection attack? (2+6] ¢)._ How does an SQL injection work? How to prevent an SQL injection aitack? (6) d) Suppose you are developit i . Appuseg? (242) PME® Web App Project. How will you understand the characteristics of Web (CSRF) attack? Mention some policies for generating a good history? How do you sanitize user input to protect your Web Scanned with CamScanner Shahjalal University of Science and Technology Institute of Information and Communication Technology Masters in IT Ist year 2nd Semester Final Exam, 2019 Course: MIT $33 (Computer Network and Internetworking) ‘Time: 3 hours Full Marks: 100 [NB: FIGURES IN THE MARGIN INDICATE FULL MARKS] ART A Answer any FIVE. SX2=10 A) How are the OSI and ISO related to each other? 'b) Which parts of the electromagnetic spectrum are used for communication? A) How does an Amplifier differ from a Repeater? “A) Write short notes on Router. .) What is the purpose of Subnetting? (71) What is the purpose of DNS? Sf Answer any FOUR. 4x5=20 a) Name three types of transmission impairment. What does a decibel measure? Imagine a “Zignal travels through a transmission medium and its power is reduced to half. Calculate the attenuation. .) How does the twisting of a twisted pair cable eliminate noise effect? “¢) What is the purpose of ARP and RARP? 4) A digital signal has 35 levels. How many bits are needed per level? _£) Write down some applications of SONET and ATM. A. Answer any TWO. 2X10=20 “f) __ i) Define Shannon Capacity? Consider an extremely noisy channel in which the value of the signal-to-noise ratio is almost zero, In other words, the noise is so strong that the signal is faint, For the channel, find out the Shannon Capacity. ii) When a mean optical power launched into a 20 km length of fiber is 100 jt W, the mean ical power at fiber output is 5 wW. Determine: ‘he overall signal attenuation or loss in decibels through the fiber assuming there are no connectors or splices. 2. The signal attenuation per km for the fiber. 3. The overall signal attenuation for a 30 km optical link using the same fiber with splices at 3 km intervals, each giving an attenuation of | dB. s i) Draw the data stream 1111010101101 101 with graph of the following scheme: 1, MLT3 ii) Given a bandwidth of 5000 Hz. for an 8-PSK signal, what are the baud rate and bit rate? iii) A receiver receives the code 11001100111. When it uses the Hamming encoding algorithm, the result is 0101. Which bit is in error? What is the correct code? ~ ) i) Define CDMA. What are the differences between CSMA/CD and CSMA/CA? ii) Explain the System model of GSM network with a diagram. Explain the functions of MSC, HLR, and BSC in detail. Page 1 of 2 Scanned with CamScanner PART B Answer any FIVE. 5X2=10 A) What were the goals of a new IPV6 design? (> Why was 128 bits chosen as the IPv6 address size? ©) What are the advantages of FDDI over a basic Token Ring? AA) What do you understand by 10BaseT? (A) What are the differences between ‘An Ethernet network using a hub’ and ‘An Ethernet using a switch” £) Draw the figure of a UDP datagram format, 5. Answer any FOUR, 4X5=20 (72) What is CSMA/CD? Describe its access Method. (>) How fast the Fast Ethernet? Explain the method of 100 Base-FX. ~)A digital signaling system is required to operate at 9600 bps. If a signal element encodes a 8-bit word, what is the minimum required bandwidth of the channel? 4) Explain LANE, €) We need to send a digital signal of 1 Kbps. If we send a digital signal u What are the required bandwidth harmonics?. g one channel, ‘we use one harmonic, three harmonics, and five Answer any TWO. 2X10-20 i) What are the two popular routing algorithms? Find out the shortest path for every node 6 from a using any one of the routing algorithm for the following figure. ii) Write short notes on Gigabit Ethernet and Fast Ethernet, 4 2) Your organization is granted a block of IPv4 addresses of 14.24,74,0/24, You need to create 3 subnets: one subnet with 100 addresses, one subnet with 70 addresses and one subnet of 20 addresses. i) Calculate the required subnet mask ii) Find the sub-network addresses iii) Find the first host, last host, and broadcast address for each subnet PP _} What is the function of a SONET regenerator? What is the duration of a frame in STS-12 3 ii) Draw a SONET network using two STS MUX (one as input and f add/drop MUX, four regenerator. seer aene news ou tee 3 i) Write down the function of different layers of SONET. Page 2 of 2 Scanned with CamScanner (b) © @) © (a) ©) © (@) © @) ) © @) Shahjalal University of Science & Technology Institute of Information and Communication Technology Masters in IT Ist Year 2nd Semester Final Examination 2019 ~ ‘Course: MIT $53 ( Natural Lan; ¢ Processing) Credits:3 ‘Time: 3 Hours (Answer any two questions from each group) Group A \What isthe goal of NLP? Why do you think that a word-count application is an NLP based application? What types of knowledge are required by NLP based applications? Satc in one line each of them, Define NLP. Consider the sentence I made her duck. What kinds of ambiguity are present in this sentence? Write the names of the methods to resolve these ambiguities. Write a regular expression to find the word basic in capital or small letter or combined forms. State the language the following regular expressions denote? . i) Fa\{2-4}2\ ii) Moegi.n/ iti) Ieolou?e! iv) /a%b/—v) AZ! vi) Mthe*/ Identify the Morphemes, Stem and EE sone for following words ) Sern ATE Define and give examples of four ways of combining morphemes into words. ‘What is a formal language? What does the following figure mean? Draw an NFSA for the regular expression /baat!/ (a sheep language). eviomata regulon expressions ‘agular ‘What is use of Porter algorithm? Show with a table the calculation of minimum edit distance between the words invention and execution using Minimum Edit Distance algorithm. Assume that insertion or deletion cost is one and substitution cost is 2 2 Define Training, Development and Test sets. What is the general convention of percentage for dividing ‘a corpus into these three sets? Define perplexity of a language model. Derive equation for perplexity for bigram model. What are the three components of a morphological parser? Give examples. The bigram counts for cight of the words (Vocabulary size V = 1446) in the Berkeley ‘Restaurant Project corpus is shown in Table one and the unigram counts in Table 2. Consider P(i|) = 0.25 and P([food) = 0.68. Calculate the probability of the sentence “i want chinese food” using bigram model. Using Laplace smoothing calculate the add-one smoothed bigram probabilities and ‘Add-one reconstituted counts for the second column (titled i). a CC i S 827 0 9 0 want 2 0 608 t ‘0 2] 0 a | 6 eat 9 0 2 chinese } 1 | 0 0 food is | 0 15 lunch 2 0 0 spend 1} o 1 Table 1: Bigram counts 7 4 to ‘eat_| chinese | food | lunch | spend 2533_[ 927 | 2417 | 146 | 138 Toss [| 341_[ 278 Table 2: Unigram Counts i Scanned with CamScanner 242 45 242 Beaed Q4 @) @) © @) ) © @ @) @) © @ Group B What is POS tagging? Give the names of two well-known tagsets along with the number of tags for 2+2+3 English language. What is the basic principle of a Rule based Tagger? : Dalvethe expression for the most likely tag sequences using HMM for bigram assumption. What are 5+3 the three ways that a HMM can be used. : Consider the HMM given in the following figure, where H and C mean Hot and Cold, respectively. 2+2+6 Caleulate the values of the probabilities P(3 1 3 |HH C), PG 13, HH C) and using Forward algorithm calculate P31 3). Give a formal definition of Context Free Grammar (CFG). What is Chomsky Normal Form (CNF)? 2+2+2+3 Write the benefit of CNF. Consider the productions rules of a CFG: VP —» Verb, VP —» Verb NP, VP = Verb NP PP, Verb —+ go | eat | play. Convert these rules into CNF, Consider the following Context Free Grammar. 10 S3NPVP Dat the NP +DaN De +a VP + VNP N + meal V => includes _N_~> flight Complete the CKY matrix for the sentence The flight includes a meal With examples, state the two types of structural ambiguit ‘Write the Bifference between top-down and bottom-up parsing. ‘What is a tree bank? Give an example, 2 ‘The image shows a parsed sentence taken from a treebank. What is the original sentence? What is the 24144 HEAD of the sentence? Show dependency tree of this parse tree. “6s NP-S3J (DT That) (os cold) (, 4) (92 empty) (KN sky} ) (7? (ED wes) (aDgz-PRD (39 full) (2? (IN of) (uP (oN £ire)))))) ‘What is the significance of Probabilistic Context Free Grammar (PCFG)? Write the algorithm for 244 probabilistic CKY parsing, Consider the following Probabilistic Context Free Grammar (PCG). 10 S + NPYP 80 Dei > the. 40 NP => DetN 30 Det +a 40 WP YNP. 20, N=) meat 01 V-— includes 05 N= flight 02 Complete the CKY matrix for the sentence The flight includes a meal, Scanned with CamScanner me hjalal University of Science and Technology ante Tatormat yd Communication Technology ‘Masters in Information Technology 1 Year 2 Semester Final Examination, 2019 Course No. MIT 531(Machine Learning) . Credit: 03, Full Marks: 100 Time: 03 Hours (Answer any 10 questions taking 5 from each group) GROUP-A Define Training, Testing and Validation Sets. Write short note on ROC curve. Briefly describe what Cross Validation is and why it is done. en the following two What is the purpose of using Kernel Function along with SVM? Giv t could be used for classes each with 3 points. Show graphically the separating plane that classification with the maximum margin between the classes. Class A Points: ( (10, 10), (10, 9), (9, 10)} Class B Points: (0, 1)}, (1, 0), (0, 0} ‘Assume that you are given the following dataset. Now find out your expected class using the Naive Bayes’ Classifier for the test example :X =a, Y= band Z=c X]¥[Z| Class ¢ | negative a | positive b | negative ¢ | positive a | negative Draw a suitable neural network to classify the animal kingdom given below. Use ‘Animal | Give | Can in Have | Class | Birth_| Fly | Water ___| Legs 1| Human [Yes [No | No Yes Mammal 2| Python [No |No [No No ‘Non-Mammal 3 Whale [Yes [No | Yes No Mammal 4|Frog [No [No | Someti Yes | Non-Mammal s[Ba [Yes [Yes [No Yes Mammal appropriate labels. How different types of input feature values are fed into the network? How do you initialize the network? How much training data are needed to have a fair decision boundary? How to avoid over-fitting while training the network? What activation functions you would use in different layers? Plot the following data points: (0,0, Red), (0,1, Red), (0,2, Red), (1,0, Red), (1,1, Red), (13, Green), (2,3, Green), (2,4, Green), (3,2, Green) and find the optimal separating line between classes, Point out the support vectors and calculate the margin, Write down the purpose of using slack variables, Suppose you've designed a classifier and tested with some d i lata. Aft " oor vane a. Aller testing you've got the Actual Class [+] +]-|[+]-|-]-]¥] [= Predicted | -|+{-|+]+]-|-|+]-1- Class Compute the Confusion matrix and the Accuracy of the classifier. Scanned with CamScanner aire rp Find the probability of § in terms of B and A by eliminating the variable R from the above Bayesian network. Ie What is Bootstrap Sampling? Write The Basic Random Forest Training Algorithm. 5 D. Given a ullity matrix below, representing the ratings, on a 1-5 star scale, of eightitems,a 5 through h, by three users A, B, and C. Now, find out which users rating is most similar \ith B's rating using 1) Jaccard similarity and 2) Cosine similarity J % Draw the simplest possible neural network necessary to eam the dataset given below. Use 3 appropriate labels. Use bias = I and activation threshold = 0. XL | X2 | Target 1 2t1_to_|o 3[0 1 Jo ao fo lo} i Initialize all the weights to 0.1 and assume /] = 0.25. Calculate the output forthe given 6 input data and update the weights fora single iteration. ce. Calculate total error on the dataset after the iteration, 1 GROUP-B 8 Determine True/False for the following; if False, give the correct statement: 10 ‘a. Higher entropy means more impurity in the data. bb. The decision boundary defined by Perceptron isa straight line, €. The more hidden layers are added in the network, the better the classification gets. 4G. To apply Back-propagation algorithm in a multi layer neural network, atleast one between the error function and the activation function should be differentiable e. SVM is suitable for classifying very large datasets. {The back propagation algorithm always converges to the global minimum of the error function, ig. Using proper kernel functions, a non-liner decision boundary ean be treated as linear. h. An overly fitted elasifier has good generalization ability. i ‘As the number of feature inereases, data become sparser and more data are needed for training. ‘An NxN matrix has exactly 2XN Eigen Vectors, Derive the Bayes’ Theorem from conditional probability. 3 Imagine that you are given the following set of traning examples. Each feature ean take on 7 one of three values: A, B, or C. How would a Naive Bayes’ system classify the test example (F1 =A, F2=C,F3=B)? FL Category | + + lajel>lal| lojal>|> lols! =|>lalol> la] Scanned with CamScanner Define Entropy. | . An fs b. Explain which feature (Al, A2 or A3) will be chosen first for branching to make a Decision ‘Tree for the given data. ‘AS Output False | Positive False | Posi Truc _| Negative ‘False | Positive | “True [ Negative | True_| Negative False | Positive False | Negative «ad The Eigen Values and igen Vectors ofan imaginary covariance mati are given below 1.05 0402050405 ¥6V> 0.25, 1100001 0.12 0110000 Eigen Values 0.75 Eigen Vectors, E=| 0011000 0.07 0001100 1.50 0000110 0.11 1000011 a. How many features are there in the data? 1 b. Sort the Eigen vectors according to their principality and make a feature vector with first 4 principal components c. Write down all the steps from the beginning with appropriate mathematical expressions to 5 have a transformed dataset with 4 principal components. |. Write how to get back the original data after doing the transformation. 2 fn Apply K-means Clustering and Euclidean distance to cluster {3, 4, 6, 12, 18, 22, 23, 6 35, 36, 39} into 3 clusters. Suppose that the initial seeds (cluster centers) are 4, 15 and 22. Show all the steps. Draw a line with all the 12 points and show the final clusters and respective centers. Stop after 3 iterations if sill it does not converge. b. Write the strengths and weaknesses of the K-means algorithm. 4 JS Assume the following taining data and find out which feature (A1, A2 or A3) will be 10 chosen first for branching to form a Decision Tree? FI_[F2_[F3___| Target WT T F Positive 2(t |[F_[F Positive | 3(T T T ‘Negative ratF__|F__|F | Positive Ea ee ‘Negative lol F eaeaal Negative | 71 bd Pos off Tt Negative 14 a. Consider the following points to calculate the equation for the Linear Regression line. 5 x | 95 | 85 | 80 | 70 | 60 85 | 95 | 70 | 65 | 70 . Suppose you've designed a classifier and tested with some data, After testing you've got the § following predictions: ‘Actual Class ed ee ee ee Predicted =r leesineniwesirarlacloa le Ioeal ec Class : Compute the Sensitivity, Specificity and Precision, Scanned with CamScanner 2 a) Institute of Information and Communication Technology Masters in IT 1"! Year 1*' Semester Final Examination (2018-19) MIT 527: E-Governance ‘Time: 3 hours, Marks: 100 (You have to answer 2 questions from each group) Group A E-governance concentrates using ICT in governance, Who are the stakeholders of e- governance? What are the objectives of the different stakeholders? What are the general challenges of e-governance? Discu: the context of Bangladesh, What are the potential e-governance application areas? Mention principal benefit of e- governance considering those areas, One of the component of citizen-centric e-governance system is Principle of citizen- centric e-governance design. What are elements of this component and how to address those components? What is e-GIF? What are the scopes of e-GIF? How to apply e-GIF? Show architecture of e-GIF, What are the strategic goals of e-Governance? Discuss the strategic focuses of e- governance in Bangladesh? Why is Citizen Requirement Study (CRS) important? How can these requirements be collected? Depict an architectural model of e-governance? Group B What is Big Data? What are the characteristics of Big Data? Discuss with 6Vs' What is cloud computing? Discuss different types of cloud computing. How cloud computing can be used in e-Governance. What are the differences between cloud computing services PaaS, SaaS, IaaS? What are the technical aspects we need to consider during introducing e-Governance? How do network infrastructure and publishing play a role in this technical aspect? What are the differences between privacy, security, authentication and confidentiality? Why are these important to consider during e-governance implementation? What is di application? cer icale? How e-governance system can use this concept in its What is e-democracy? How can i-voting works in e-democracy? How does online activist participate in ¢-governance concept? What is your opinion regarding their contributing in democracy? What is Hacktivism? Discuss the criticism of Hacktivism, Scanned with CamScanner 10 10 10 10 oo 10 10 10 10 10 10 10 10 Shahjalal University of Science and Technology Institute of Information and Communication Technology Masters in IT Ist year Ist Semester Final Exam, 2019 Course: MIT 525 (Database Architecture and Administration) Full Marks: 100 ‘Time: 3 Hours Group -A (Answer any two) JX 2) Describe several advantages of a database system. What are two disadvantages? b) List four significant differences between a file-processing system and a DBMS. c) Describe the Database Systems architecture (internals) with proper diagram. 4) What are the five main functions of a database administrator? e) Describe the differences in meaning between the terms instances and schema. ) Define DDL and DML with examples. classroom(building, room_number, capacity) department(dept_name, bu title, dept_name, credits) Iding, budget) instructor(ID, name, dept_name, salary) section(course_id, sec_id, semes teaches(ID, course _id, set year, bui c_id, semester, year) ding, room_number, time_slot_id) student(ID, name, dept_name, tot_cred) takes(ID, course id, see id, semester, year, grade) advisor(s_ ID, i 1D) time_slot(time_slot_id, day, start_time, end_time) prereq(course_id, proreq_id) Figure 1: University Database we 8) Consider the University database of Figure 1. Write the following query in SQL, using the University schema. i, Find the names ofall departments with instructor, and remove duplicates, ji, Find the course ID, semester, year and title of each courge offered by the Comp. Sci department, iii, Find the names of all instructors who have . @ higher salary than some instructor in “Comp, Find the names of all instructors with salary between $90,000 and $100,000. ¥- Find the names of all departments whose building name includes the subst ing ‘Watson’, vi. Find the average salary in each department, Poge 1 of 2 Scanned with CamScanner 20 vii, Update all i y others receive a 5 percent raise, Insert a course CS-437 in the Computer Science depa ‘,and 4 credit hours. ix, Delete all tuples ructor relation pertai department. x. Delete all tuples in the instructor relation for those instructors associated department located in the Watson building. b) What do you understand by Comps a) Explain the di ) Explain the d ference between a weak and a strong entity set. tructors with salary over $100,000 receive a 3 percent raise, whereas all iment with title “Database ing to instructors in the Finance attribute? Explain One-to-many relationship. inctions among the terms primary key, candidate key, and superkey. c) Design an E-R diagram for keeping track of the exploits of your favorite sports team. You should store the matches played, the scores in each match, the players in each match, and individual player statistics for each match. Summary statistics should be modeled as derived attributes. 4) Explain the difference between a weak and a strong entity set. Group - B (Answer any two) 4, a) What is normalization? b) Give a lossless-join, dependency preserving decomposition into 3NF of the following video library schema. Also explain the each steps. ‘member(membershipid, fullname, physicaladdress, saluation) movierented(membershipid, moviesrented) c)' Why are certain functional dependencies called transitive functional dependencies? Explain with proper example. 4) Explain specialization and generalization with proper diagram. Sa) List the ACID properties. Explain the usefulness of each. b) Define transaction. Explain the different state of a transacti ¢) Define deadlock. How can you detect a deadlock and recover it? 4d) Define the following parameters (performance measure of disk): i, Access time ii. Seek time . iii, Mean time to failure (MTTP) Sa) What is the difference between the Transuétion Server and Data Server? b) Explain Speedup and Scaleup of a Parallel §: ©) What are some mi 4) When is it preferable to use a dense index ©) Explain the distinction between static and. dynamic hashing, Paoe 2.09 n with proper diagram, Parallel System using appropriate graph. reasons for building Distributed Database System? rather than a sparse index? Explain your answer. Scanned with CamScanner ao 6 10 pana Institute of Information and Communication Technology ‘Shahjalal University of Science and ‘Technology, Sylhet ‘Masters in Information Technology Program st Year Ist Semester Final Examination (2018-19 Session) : Course Code: MITS21. Title: Computer Programming and Algorithm Full Marks: 100 ‘Time: 3 hours (Answer 2 questions from each group) GROUP A. 2 Via isthe fnetion ofa header file? bi an oie integers 22 and Y and one of the operators + ~ %,/ oF *. Write a program to perform X 4 erator} Y and display its esl, For example, i you are given 15 8 + as inputs then you have to fivethe answer of 15+ 8, that is, 23 {Veit he values ofthe following expressions considering the declaration statement int a=$,b=2; float p=7.5; char ch™= ‘A’; 3) Mooxp-1) sqrt) . by) S#{atb) !=35 ©) (atsop)teh:cht . } am+3) i “J8)_ Weitethe output of te following program i is gven a input. 6 Fineludeesidio > neludecrath > int mang { print'Entera number") Scani('%d" en, fonti= 231-< nit) { fon 2:5 Grpomti05)3+*) _fey ‘Write a program that takes 100 integer numbers as inputs and displays the smallest one as output. 7 a2. (a) What is complexity of an algorithm? Give a formal definition of big © notation, Suppose the 1.5+1. ‘complexity of an algorithm can be expressed by a polynomial function P(n) = ay + ayn + ayn? +. + 543 ‘aun Show that P() = Of") Suppose two different algorithms A and B solve same problem but have time-complexities Joga and y°+5, respectively. Which algorithm is better and why? ‘Write an algorithm for binary search, Derive the expression for complexity of binary search. Suppose S+3+4 an aray contains the following numbers. Show various steps to find the number 95 using binary search, 10 20 3040 50 60 70 80 90 (a). Briefly explain the two ways to represent array in memory. Why is array called static data structure? 342 Q3. (a) Suppose the following numbers are stored in an array A: 6 34, 78, 6, 10, 32,15, 12,98 Apply the bubble sort algorithm tothe aray A. Show each pass separately. (b) Consider the following binary tre. Show linked and array aa #3 representations of the tree, For what type of binary trees, By oe. array representation is preferable? Justify your answer. aa > (©) Represent the following anay A in memory using Row-Major «20-4 6 and Column-Major representation method. 3110 0-1 10 in? 167 (@) Let LIST be a linked list in memory. Write a procedure to find the number of times agiven 5 item oceurs in lst. (ec) What is garbage collection? ‘ 4 Scanned with CamScanner e age 2 of? nour 3 1) Nt et cant oc? iiNet wg 1) wee op of cl variable tomatic vrale, Formal argument and actual argument fom fa a ili) at modify(int ©); { Le a “conor ‘ retum ¢; fais 1 { © ein ti ‘ a2 Joh What is the outa of includesstdiol> + soi maing) imsehys im *px, pxe&x: following C program? Fetum 0; , BAF WeiteC progam haces ipsa two one displays ther scalar product where scalar product is #2 8 * 8. (6) Change the program of question 4(2) so thatthe program takes inputs into array A and B from a data. 4 imensional arays (each of 10 elements) A and Band 7 Qs. OS sna isveovt Wate atsniqt ombann i oveowia te wneyreprseaaon cack, 245 Ce aati ia tepeenE ego dnesonl_& Mm Start ts (AERC ER TEE E Ge (©) What are the two base 60 used by the compiler ‘Tower of Hanoi problem. @) Consider the following queue of characters, where QUEUE is a circular array which is allocated six 5 memory eels FRONT=2, REAR=4, QUEU tons that must be satisfied by a recursive function? Which data structure is 2+1+4 mplement the recursion? Write a recursive function to generate the solution of ACD. Deseribe the queue as the following operations take place: §) F is added to the queue vi) two letters are deleted ii) two letters are deleted vii) S is added to the queue iil) K, Land M are added to the queue viii) two letters are deleted iv) two letters ae deleted ix) one letter is deleted ¥) Ris added to the queue x) one letters deleted 6, wr ‘The inorder and preorder traversals of a binary tree yield the following sequences of nodes: 3 Inorder: EAC K EHD BG Preonder: FAEK CDUGB Draw the te. oe Construct a binary search tree from the following values. The values are inserted in the givenorder; 44345 61,5, 10,8,9, 2, 8, 77,38, 2, 100, 94 A shoo the fal wes only. Traverse the re in pos onder Delete 10 and redraw te wee ‘Consider the following data items and their weights. Construct an extended binar ‘ith minimum ‘Seid path ag sng Hanan algprigms ee ee nisin Dataltem A £ 1 ° u w Weighs: 10 25 6 1s ” rected graph end muli graph, 2 Bein - Scanned with CamScanner

You might also like