For each of the following situations: ! Pick the search that is most appropriate, be specific about visited and expanded list ! Give a one sentence reason why you picked it. (advantage and disadvantages). 1. We need to find the least cost path to find the goal. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________ 2. We need a search algorithm that is fast and memory efficient, repeating the work is not an issue. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________ 3. We have a space and we search the tree from both the start and the goal at the same time. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________ 4. We need a search algorithm that is complete and optimal without considering the number of steps involved. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________
In: Computer Science
1) List the three steps of test driven development and explain,
in detail, why these three steps are used.
2) Explain why the order of the steps is so
important.
3) For each of the following data types, explain what boundaries might be relevant to testing. Also, explain what values you would consider testing for parameters of this type. Justfiy your answers.
In: Computer Science
Write 6 paragraphs Describing the algorithms that are actually used by modern computers to add, subtract, multiply and divide positive integers.
In: Computer Science
Write an application named DisplayMultiplicationTable that displays a table of the products of every combination of two integers from 1 through 10
Beginning Code. Please answer in C#
using static System.Console;
class DisplayMultiplicationTable
{
static void Main()
{
// Write your main here.
}
}
}
In: Computer Science
a. Celsius and Fahrenheit scales have zero values. Why are they not ratio scales?
b. Provide an example of an interval scale not mentioned in the text that is not a ratio scale. If you scale has a zero element, briefly explain why the zero element does not make it a ratio scale.
c. Provide an example of a ratio scale not mentioned in the text. Briefly explain why the zero element of your scale makes it a ratio scale.
In: Computer Science
Consider a modification to the DFS procedure such that it
returns for an undirected graph
G, the connected components of G. To do this, you will modify the
DFS procedure to
• maintain a counter i, initially set in 1, that counts how many
connected components we found so
far; and
• on each vertex v ∈ G.V maintain an attribute component indicating
to which connected component
number v belong to. That is, when DFS terminates, v.component
indicates the component number
1, 2, . . . i that v belongs to.
Answer the following questions:
(a) Write the pseudocode for this slightly modified version of the
DFS algorithm
(b) Explain why your algorithm is correct and its running time. You
do not need to provide a formal
argument for correctness, but be sure to explain in clear
terms.
In: Computer Science
You have been given a task to differentiate between the images of a cat and a dog. You have been given a dataset of 50000 coloured images of size 40x40 which contains either a cat or a dog. Being as specific as you can, please detail the procedure of how you are going to solve this problem.
In: Computer Science
We are working on Public Key Crypto, RSA, Extended Euclidean algo
Let n = 2419 = 41 ∗ 59 and e = 7. (1) Find the private key d. (2) Encrypt the message 6. (3) Sign the message 10. Assume RSA is used. Use the egcd.py program at the lecture attachments folder, described in section 10.3.3, to compute d. For parts 2 and 3, you only need to show the formula; there is no need to calculate the final results.
egcd.py
#!/usr/bin/python3
def egcd(a, b):
if a == 0:
return (b, 0, 1)
else:
g, x, y = egcd(b % a, a)
return (g, y - (b // a) * x, x)
print ('This program gets two integers and calculates their
gcd')
print ('Example: input e=18 phi=24, output gcd(18,24)=6 d=-1
y=1')
e = int(input('Input a number for e: '))
phi = int(input('Input a number for phi: '))
g, x, y = egcd(e, phi)
print ('gcd = ', g)
print ('d = ', x)
print ('y = ', y)
In: Computer Science
1) Compare and contrast the decorator and the strategy patterns. How are they similar? How are they different?
2) Why are referential equality and the instance of operators a problem for decorators?
In: Computer Science
Conflict in the corporate environment is unavoidable.
a) Write a critique about two conflict resolution methods, and how the compare with each other
In: Computer Science
Problem 6.3 Sum of Numbers - Similar to Problems 6.1 & 6.2, you must sum up 5 numbers. However, you will obtain these numbers from a list box for which you have used the String Collection Editor to insert a number on each of 5 lines in the box. You may use any type of loop. The result is displayed in a text box. The program is initiated with "Go" button.
Problem 6.3 does NOT require an Input Dialog Box. Instead, YOU
the PROGRAMMER put a list box control on the form. The PROGRAMMER
loads up the list box at design time with all five (5) numbers to
be summed.
In: Computer Science
Consider any project that you have been involved in. Then discuss its features to justify how and why it is a project.
In: Computer Science
Task 6
Using the following table structure, identify all functional dependences and then decompose this table into a set of 3NF relations. Your answer should:
|
CharId |
CharName |
ActorName |
FigId |
OwnerId |
Pseudonym |
|
Vader |
Darth Vader |
David Prowse |
f14 |
Bill |
Jabba the Hoot |
|
Vader |
Darth Vader |
David Prowse |
f22 |
Amy |
Don’t Blame Me |
|
Yoda |
Yoda |
Frank Oz |
f16 |
Lucy |
Xena Warrior |
|
Leia |
Princess Leia |
Carrie Fisher |
f45 |
Bill |
Jabba the Hoot |
|
Leia |
Princess Leia |
Carrie Fisher |
f99 |
Amy |
Don’t Blame Me |
In: Computer Science
Hello, I have a problem with understanding this code.
value.parseHtml().select("p")[0].innerHtml()
This code is for the open refine program. Could you tell me what this code is trying to do? I have no idea what this is for...
For your information, this code appeared when professor was talking about 'Fetching and Parsing HTML'..
Thank you for answering my question and have a good day!
p.s. I don't know whether value.parseHtml().select("p")[0].innerHtml() is a code.
Anyways, my professor told us to insert that expression in the expression box and try to figure out what this expression means... As I'm not majoring in CS, it's too difficult for me to understand..;(
In: Computer Science
In C++: Provide a linked implementation of a deque and name it LinkedDeque (use singly linked list). It can be a template/generic class or you can set it up with a certain data type. Use a test driver to try out your LinkedDeque by adding and removing values from both ends.
In: Computer Science