Please explain answer a little bit I'm familiar with these all topics..just give hint with your answer... the first question is quick sort 1) (13 points) Show the results of pivoting the following array using 0.34 as the pivot value. 0.34 -4.62 8.50 -5.45 7.80 8.19 9.72 -2.85 0.88 -0.07 -0.28 -3.58
2)(13 points)
Draw the graph defined by the following adjacency matrix:
? ? ? ? -4.8 -2.3 9.7 3.9
? ? -4.6 5.1 -8.5 2.0 -2.2 -9.1
? -4.6 ? -2.9 -2.4 -3.2 2.3 ?
? 5.1 -2.9 ? ? 9.0 7.4 5.0
-4.8 -8.5 -2.4 ? ? -5.0 -6.9 -9.6
-2.3 2.0 -3.2 9.0 -5.0 ? 5.9 -7.7
9.7 -2.2 2.3 7.4 -6.9 5.9 ? -3.8
3)(13 points) Show the order in which the vertices of the graph from question 3 will be visited in a depth first traversal. Use 0, 1, 2, 3, 4, 5, 6, 7 as the names of the nodes, and assume that the neighbors of any node are given in left to right order across the matrix.
4)(13 points) Consider the following adjacency matrix. ? 4.0 3.0 1.0 4.0 ? 8.0 1.0 3.0 8.0 ? 5.0 1.0 1.0 5.0 ? Use Kruskal's algorithm to find a minimum spanning tree.
3.9 -9.1 ? 5.0 -9.6 -7.7 -3.8 ?In: Computer Science
In this assignment, you need to determine the network ID, first usable host, last usable host, range of valid addresses, and broadcast address of a network. Must be written on paper
Please write on paper
In: Computer Science
Write one Java application based on the following directions and algorithms. Make sure the results from each of the numbered items is separate and easy to read/understand.
1.Create an array that will hold 4 string values. Write three separate statements to store your favorite color, your favorite song, and your favorite restaurant in the array elements. I do not want you to use a loop in this logic; use hard-coded index values instead. Print *ALL FOUR* of the values of the array using individual index values. What is stored in the element you did not fill?
2.Create an array that will hold 5 string values. Use a for loop to prompt the user to enter their 5 favorite movies and store each one in a separate element of the array. Print the values of the array using a For-Each loop.
3.Create an array to hold 7 doubles. Use any looping structure you want to prompt the user to enter a value and store it in the array. In a separate loop, compute the sum of the values. In a third, separate loop, display the array values in reverse order. Also display the sum.
4.Create an array that will hold 3 integers. Without prompting the user for input or using a loop, fill that array with the values 23, 0, and -5. Write decision logic to determine whether the values in each array element is negative, positive, or equal to zero. Make the decision logic loop 3 times, since we want to test 3 different values.
In: Computer Science
Use Matlab GUIDE to create a program with graphic user interfac(GUI). The program is designed to convert the temperature from Celsius to Fahrenheit and the opposite.
(Hint: use radio button)
In: Computer Science
I would like to see a java language example using classes customer() and animal() which get user input and return the information to class database().
class customer() should return user input for firstName, lastName, address, phoneNum, customerNum.
class animal() should return information for animalName, animalType, gender, animalLocation.
In: Computer Science
7.15 Translate the following string method invocations to functions calls in namespace str:
(Python)
(a) ' error'. upper( )
(b) ' 2, 3, 4, 5'. split(',' )
(c) ' mississippi'.count('i' )
(d) ' bell'.replace('e' , 'a' )
(e) ' '. format(1, 2, 3)
In: Computer Science
1-Create a one-dimensional array of 99 double values. Then, use a for loop to add a random number from 0 to 100 to each element in the array. To do that, use the random method of the Math class to get a double value between 0.0 and 1.0 and multiply it by 100
like this
Math.random() * 100
2-Use an enhanced for loop to sum the values in the array. Then,
calculate the average value and print that value on the console
like this
Average: 50.9526671843517
3-Use the sort method of the Arrays class to sort the values in the
array, and print the median value (the 50th value) on the
console
like this
Median:
52.18369291650803
-Print the 9th value of the array on the console and every 9th
value after that.
like this
position: 9 8.927702403161032
position: 18 14.0531287498060076
...
position: 99 22.471670293184822
In: Computer Science
URGENT
Given some very common assembly language command, like, for example, the following instruction.
ADD ECX, EAC
Please, describe the main CPU algorithm, or, the major stages of the instruction processing executed by the CPU within the instruction cycle. Assume, no pipelining is available.
In: Computer Science
Compute the following subtraction problems using two’s complement (Keep answers in two’s comp. 4-bit binary). (Four Points)
In: Computer Science
This is JAVA. Must write a short description of this program, usually a sentence or two will be sufficient. All the classes, methods and data fields should be clearly documented (commented).
Write a program that will predict the size of a population of organisms. The program should ask for the starting number of organisms, their average daily population increase (as a percentage), and the number of days they will multiply. For example, a population might begin with two organisms, have an average daily increase of 50 percent (=0.5), and will be allowed to multiply for seven days. The program should use a loop to display the size of the population for each day.
Input Validation: Do not accept a number less than 2 for the starting size of the population. Do not accept a negative number for average daily population increase. Do not accept a number less than 1 for the number of days they will multiply.
Example Run
Enter the starting number organisms: 2
Enter the daily increase: 0.5
Enter the number of days the organisms will multiply: 7
Day Organisms
-----------------------------
1 2.0
2 3.0
3 4.5
4 6.75
5 10.125
6 15.1875
7 22.78125
In: Computer Science
PHYTON QUESTIONS
Your assignment is to write the following magic methods for the Date class.
1. __eq__ returns True if two Date objects have the same month, day, and year.
2. __add__ is passed an int as a parameter, and adds that number of days to the Date. It is nondestructive. For example:
>>> d = Date(1,31,2017)
>>> d + 5 Date(2,5,2017)
>>> d Date(1,31,2017)
3. __getitem__ is passed either an int between 0 and 2, or a str ‘month’, ‘day’, or ‘year’. It returns the appropriate instance variable from the Date object, or raises an exception otherwise. For example:
>>> d = Date(2,1,2017)
>>> d[0] 2
>>> d[2] 2017
>>> d[‘day’] 1
>>> d[4] # should raise an IndexError
4. __setitem__ is passed an index (as described in problem 4) and an integer, and sets the month, day, or year of the Date object to be that integer. If the index is not of the correct type or value, then an exception is raised. For example:
>>> d = Date(2,1,2017)
>>> d[0] = 5
>>> d Date(5,1,2017)
>>> d[‘year’] = 2020
>>> d Date(5,1,2020)
>>> d[‘moth’] = 31 # should raise an IndexError
5. __radd__ is passed an integer, and modifies the Date object to be the specified number of days into the future. It is destructive. For example:
>>> d = Date(2,1,2017)
>>> d += 28
>>> d Date(3,1,2017)
In: Computer Science
in Java:
A point in the x - y plane is represented by its x-coordinate and y-coordinate. Design a class, pointType, that can store and process a point in the x - y plane. You should then perform operations on a point, such as :
– Print the point
– Set the x-coordinate
– Set the y-coordinate
– Get the x-coordinate
– Get the y-coordinate
– Add() : add two points
– Sub(): subtract two points
– Mul(): multiply two points
– Div(): divide one point from the other
– Ass(): assign one point to the other
– Equ(): check if two points are equal
– LessThan(): check if one point is less than the other • Note: R = √ X2 − Y2
– The default constructor
– The second constructor
– The copy constructor 2.
## Design a class pointTypeTest to test the design of pointType.
Thank you in advance!
In: Computer Science
7) Given a binary search tree, insert a new node with specific data such that the binary tree after the insertion is also a binary search tree.
8) Given a binary search tree, delete a node with a specific data value such that the binary tree after the deletion is also a binary search tree.
reply in c++
In: Computer Science
13. For a computer, you are given the following parameters:
Average memory access time in the absence of paging (i.e., a single physical memory access time, which is computed by considering the main memory access time and the CPU’s L1 cache): 80 ns
TLB access time: 2 ns
TLB hit ratio: 75%
Note that all PTE’s are stored in main memory. There is NO disk access. CPU’s L1 cache is the hardware cache on the CPU chip for accelerating memory accesses.
- Assuming a 1-level page table (PT), what would be the average memory access time with paging enabled? Show your work.
- Assuming a 2-level PT, what would be the average memory access time
with paging enabled? Show your work.
In: Computer Science
(a) Write the function rowSum() that receives a(double type) two-dimensional array using vectors and returns a vector consisting of the sum of elements in each row of the two-dimensional structure. The value of the returned vector at index zero is the sum of the elements in row zero of the two-dimensional structures. At index one of the returned vector is the sum of the elements in row one and so on. (b) Write a main function to test rowSum () function. Create a two-dimensional vector of at least size (5 x 5). Display the array and the content of the returned vector.
In: Computer Science