4.A palindrome is a nonempty string over some alphabet that reads the same forward and backward. Examples of palindromes are all strings of length 1, civic, racecar, abba,…
Give a DP algorithm to find the longest palindrome that is a subsequence of a given input string. What is the running time of your algorithm? (40 points).
•Examples:
•Given the input “character”, your algorithm should return “carac”.
•Given the input “TTATGTGAT”, your algorithm should return “TATGTAT”
Python Code only
In: Computer Science
Make your Curriculum Vitae using MS Word which includes the following heading :objective, academic qualification, field of interest,skills projects and two references and also insert a picture in it.
The Curriculum Vitae should be properly formatted and font styles should be times new roman with single line spacing .
Include your name and roll number in the header field
In: Computer Science
JAVA Write a program that translates a user-input floating-point number between 0 and 4 into the closest letter grade. For example, the number 2.8 (which might have been the average of several grades) would be converted to B–. Break ties in favor of the better grade; for example 2.85 should be a B. NOTE: Your implementation must include the definition/implementation and use/calling of the method numberGradeToLetterGrade that is passed a double numeric grade to its parameter variable, and returns the letter grade.
In: Computer Science
What is the glue, from a client perspective, between a URL and an IP address? Explain how this process works.
In: Computer Science
1a)Giving an array of integers A[1:8] ={5, 1, 3, 2, 7, 6, 8, 4}.
What is the running time of the insertion sort if both A[1..n/2] and A[n/2+1,n] are also sorted. Justify your answer.
2-illustrate the operation of RADIX-SORT on the following list of English words: COW, DOG, SEA, RUG, ROW, MOB, BOX, TAB, BAR, EAR, TAR, DIG, TEA, NOW, FOX.
3-Use counting sort, sort the following numbers: 4, 2, 5, 4, 2, 3, 0, 2, 4, 3
In: Computer Science
Consider the middle 3 digits of your student ID composed of seven digits. Convert it to binary format (each digit is represented by a maximum of 3bits). For example, 1060385 is simplified to 603 and then converted to 110 000 011. Assume now that we want to send your student ID while being able to detect and correct single bit errors. 1.1) Using two-dimensional parity check show what will be transmitted
Consider the middle 3 digits of your student ID composed of seven digits. Convert it to binary format (each digit is represented by a maximum of 3bits). For example, 1060385 is simplified to 603 and then converted to 110 000 011. Assume now that we want to send your student ID while being able to detect and correct single bit errors.
1.1) Using two-dimensional parity check show what will be transmitted codeword using datawords of size 3bits.
1.2) Using the hamming code show what would be the codeword that corresponds to your simplified binary student ID. Dataword size is 9bits.
1.3) Assume that a single bit error occurred and corrupted the 8th bit (numbering starts from 1 and from right). Show that the receiver of such corrupted codeword will be able to correct the error when using the hamming code.
codeword using datawords of size 3bits. 1.2) Using the hamming code show what would be the codeword that corresponds to your simplified binary student ID. Dataword size is 9bits. 1.3) Assume that a single bit error occurred and corrupted the 8th bit (numbering starts from 1 and from right). Show that the receiver of such corrupted codeword will be able to correct the error when using the hamming code.
3 digits 205
hand writing please good
In: Computer Science
In: Computer Science
Develop and test a Python program that converts pounds to grams, inches to centimeters, and kilometers to miles. The program should allow conversions both ways.
In: Computer Science
IT-244: Introduction to Database
*Please, i need Unique answer, use your own words (do not copy and paste).
*Please, do not use handwriting. (no need for picture)
Type your ideas/definitions/examples into the message field to the following discussion prompt:
Discussion Topics:
Assume that you have a Saudi football league player database. In this database, you have a table containing players’ attributes such as (Name, age, position, etc.) and you decided to add information about players’ agents. Would you represent the agent information as attributes in the player table or would you create an entity set for players’ agents? Justify your answer.
Note: Provide answers in your own words. Read the comments of your classmates and post at least TWO responses to their comments.
Marking Criteria:
For your Original Post: Maximum 1 mark
For your Two Responses: Maximum 0.5 mark (0.25 for each response)
In: Computer Science
What are a transaction and the SQL statements associated with transaction Management?
In: Computer Science
There is a serial program (single thread, single core) that performs a given task in 47 hours. The core operation of this program is a nested loop doing matrix multiplication.
We would like to get a faster result
We have access to a new multi-core, multi-processor machine with the following characteristics. 4-cores 3-processors. Not only does this new machine have multiple processors with multiple cores, but the single core processing speed is also 25% faster than that of the other single core machine.
8.a. What is the theoretical speedup of this new machine over the old?
8.b. What is the theoretical efficiency of this new machine over the old?
8.c. How many more core operations will this new machine have to do compared to that of the old machine?
8.d. How long will it take the new machine to perform the task that took the old 47 hours?
In: Computer Science
Implement a generic queue. Use the code below for main().
main()
{
int i, x;
float y;
char z;
Queue<int> A;
Queue<float> B;
Queue<char> C;
ifstream in;
in.open("int.txt");
for (i = 0; i < 100; i++){
in >> x;
A.enqueue(x);
}
cout << A.dequeue() << endl;;
for (i = 0; i < 12; i++)
A.enqueue(i);
cout << A.dequeue() << endl;
cout << A.dequeue() << endl;
cout << "Dequeueing: "<< A.dequeue()<< endl;
while (!A.isEmpty())
cout << A.dequeue() << " ";
if (A.isEmpty())
cout << "Integer Queue Is Empty " << endl;
in.close();
cout << endl << "Now for the floating point numbers...." << endl;
in.open("float.txt");
for (i = 0; i < 100; i++){
in >> y;
B.enqueue(y);
}
cout << "Here are the first ten:" << endl;
for (i = 0; i < 10; i++){
cout << B.dequeue() << endl;
}
in.close();
in.open("char.txt");
for (i = 0; i < 100; i++){
in >> z;
C.enqueue(z);
}
cout << "Here are the characters" << endl;
while (!C.isEmpty()){
cout << C.dequeue();
}
in.close();
}
In: Computer Science
\To make the most of programming, you need to deeply understand the principles that underly the paradigm that you are using. For this task you must explain the principles of object oriented programming and relate these to the programs you have created. Create an article / blog post / letter to a friend / comic / movie / podcast / etc that explains the principles of object oriented programming, as you understand them, and outline what qualities you should look for in good object oriented programs. 1. Keep it to about 1 or 2 pages of text (if text based) 2. Videos or podcasts should be kept as short — but still demonstrate depth of understanding. 3. Creativity will be valued Make sure your explanation covers the following: Relate these to programs you have written in this unit. Note: Explain is more than just a description, you want to convey a deeper understanding that can be achieved with a simple description. Try to relate the principles together and express the depth of your understanding. Tip: A deep explanation does not need to be a long one. Aim to convey your understanding in a concise fashion. Tip: Including references to textbooks (not wikipedia) or research papers can help you strengthen your explanation. Remember to reference other peoples work. Concepts and Principles Programming Artefacts Abstraction Encapsulation Class Method Inheritance Polymorphism Object Fields Roles Responsibilities Interface Collaborations Coupling Cohesion
Relate these to programs you have written in this unit.
In: Computer Science
This is the code that needs to be completed... Thank you!
public class MultiplicationTable
{
private int[][] table;
private int rows;
private int cols;
/* Instantiate the two dimensional array named table.
* Assign the numRows parameter to the rows field.
* Assign the numCols parameter in the cols field.
*/
public MultiplicationTable(int numRows, int numCols)
{
}
/* Using nested for loops, fill the table array with
* the values shown in the Multiplication Table document.
*/
public void fillArray()
{
}
/* Using nested for loops, print the table so it looks like
the
* table shown in the Multiplication Table document.
*/
public void printArray()
{
}
}
In: Computer Science
Compare and contrast the three techniques of dealing with critical sections of code in (1) busy-wait, (2) mutex, and (3) semaphore.
In: Computer Science