Ultimate Engineering Study Guide - Questions & Answers
Consider C-35a) For cach of k = 16, 17, - ,25, write the unique output of the ring counter,(21, 72, I3, 74, 25).b) For k = 15, write two possible outputs of the ring counter.
QUESTION 1: Search --A* Variants [20 Marks]Queuing variants: Consider the following variants of the A tree search algorithm. In all cases, g is the cumulative path cost of a node n, h is a lower bound on the shortest path to a goal state, and no is the parent of n. Assume all costs are positive.i. Standard Aii. A*, but we apply the goal test before enqueuing nodes rather than after dequeuingiii. A*, but prioritize n by g (n) only (ignoring h (n))iv. A*, but prioritize n by h (n) only (ignoring g (n))v. A*, but prioritize n by g (n) + h (no)vi. A*, but prioritize n by g (no) + h (n)a) Which of the above variants are complete, assuming all heuristics are admissible?b) Which of the above variants are optimal, again assuming all heuristics are admissible? c) Assume you are required to preserve optimality. In response to n's insertion, can you ever delete any nodes m currently on the queue? If yes, state a general condition under which nodes m can be discarded, if not, state why not. Your answer should involve various path quantities (g, h, k) for both the newly inserted node n and another node m on the queue.d) In the satisficing case, in response to n's insertion, can you ever delete any nodes m currently on the queue? If yes, state a general condition, if not, state why not.Your answer involves various path quantities (g, h, k) for both the newly inserted node n and another nodes m on the queue.e) Is A with an e-admissible heuristic complete? Briefly explain.f) Assuming we utilize an e-admissible heuristic in standard A* search, how much worse than the optimal solution can we get? l.e. c is the optimal cost for a search problem, what is the worst cost solution an e-admissible heuristic would yield? Justify your answer.g) Suggest a modification to the A algorithm which will guaranteed to yield an optimal solution using an e-admissible heuristic with fixed, known e. Justify your answer.
Binary Search Tree (BST)The following Program in java implements a BST. The BST node (TNode) contains a data part as well as two links to its right and left children.1. Draw (using paper and pen) the BST that results from the insertion of the values 60,30, 20, 80, 15, 70, 90, 10, 25, 33 (in this order). These values are used by the program I2. Traverse the tree using preorder, inorder and postorder algorithms (using paper and pen)
Exercise 1:Computer Addresses Management Numeric addresses for computers on the wide area network Internet are composed of four parts separated by periods, of the form xx.yy.zz.mm, where xx, yy, zz, and mm are positive integers. Locally computers are usually known by a nickname as well.You are designing a program to process a list of internet addresses, identifying all pairs of computers from the same locality (ie, with matching xx and yy component).(a) Create a C structure called InternetAddress with fields for the four integers and a fifth component to store an associated nickname.(b) Define a function, ExtractinternetAddress, that extracts a list of any number of addresses and nicknames from a data file whose name is provide as argument, and returns a dynamically allocated array that holds the indicated number of internet addresses (represented in InternetAddress) objects) retrieved from the file. The first line of the file should be the number of addresses that follow. Here is a sample data set:113.22.3.44. plato555.66.7.88 gauss 111.22.5.88. mars234.45.44.88. ubuntu(c) Define a function CommonLocality that receives as arguments the array constructed in a) and the number of internet addresses, and displays a list of messages identifying each pair of computers from the same locality. In the messages. the computers should be identified by their nicknames. Here is a sample message: Machines plato and mars are on the same local network.(d) Define the main function that prompts the user to enter the name (computers,txt) of the file containing the Computer addresses as described in (b) and displays a list of messages identifying all pair of computers from the same locality.
You are required to build a database that keeps track of university instructors, the courses they teach and the textbooks they use. Given the requirements below, design a database using Oracle SQL Data Modeler.1. An instructor has a unique id (an 8-digit number), a name composed of first and last names (strings with a maximum of 20 characters each), and belongs to a department identified by a department id (4-digit number) .An instructor has at least one phone number. A phone number is a string with a maximum of 10 characters.2. A course has a unique code (string of 7 characters, eg: RGIS606), a title (string of up to 40 characters long eg: Database Management Systems) and a corresponding department. Instructors teach sections of courses. A section is identified by its number ( a 2-digit number, eg: 01) and the semester (6-digit number, eg: 202010) it is offered in. A section is related to the course by an identifying relationship.3. A textbook is identified by its ISBN (a string of a maximum of 20 characters), has a publisher (string of 40 characters), and has one or more authors. The authors name is composed of first and last names (a string of 20 characters each).4. Each section is taught by exactly one instructor, but an instructor can teach more than one section.Each textbook is used by at least one section.Save the design as university_1.if you can do this on SQL data modeler and post the link please