Questions
Build a Dynamic Programming algorithm in Python for the following problem. Given two sequences of vowels,...

Build a Dynamic Programming algorithm in Python for the following problem.

Given two sequences of vowels, find the length of longest subsequence present in both of them.

NOTE: A subsequence is a sequence that appears in the same order, but not necessarily contiguous. For example, “aei”, “aeo”, “eio”, “aiu”, ... are subsequences of “aeiou”.

Sample Input 1:

aeiou aiu

Sample Output 1:

3

Sample Input 2:

aeaiueoiuaeeoeooaauoi aeuioauuuoaeieeaueuiouaiieuiuuuaoueueauaeiauuo

Sample Output 2:

16

Sample Input 3:

iioioieiaiauaoeoiioiiue iuuueauiaieooaoaaouaaaae

Sample Output 3:

10

Sample Input 4:

iauuieeuuiieiuaeaioaieiaeeuouueaeiuiuuaiioaeuoueuiue oeeiauiiioaieoaouuuiueouauueeiauuiiuueeo

Sample Output 4:

26

Write a program, test using stdin → stdout

In: Computer Science

Given the differential equation x′=(x+3.5)(x+1.5)3x2(x−1)x′=(x+3.5)(x+1.5)3x2(x−1). plotting the slope field using MATLAB. Is anybody can tell me...

Given the differential equation x′=(x+3.5)(x+1.5)3x2(x−1)x′=(x+3.5)(x+1.5)3x2(x−1).

plotting the slope field using MATLAB.

Is anybody can tell me every step with this? How to get this differential equation slope field by MATLAB? I need each step. Thanks!

In: Computer Science

Question 3 - Suppose that TCP's current estimated values for the round-trip time (estimated RTT) and...

Question 3 - Suppose that TCP's current estimated values for the round-trip time (estimated RTT) and deviation in the RTT (DevRTT) are 300 msec and 35 msec, respectively. Suppose that the next three measured values of the RTT are 250 msec, 200 msec, and 330 msec respectively. Compute TCP's new value of DevRTT, estimated RTT, and the TCP timeout value after each of these three measured RTT values is obtained. Use the values of α = 0.125, and β = 0.25.

In: Computer Science

Please Write C++ PROGRAM : That will write a program that initially prompts the user for...

Please Write C++ PROGRAM :

That will write a program that initially prompts the user for a file name. If the file is not found, an error message is output, and the program terminates. Otherwise, the program prints each token in the file, and the number of times it appeared, in a well formatted manner. To accomplish all this, do the following:

- Open the file - the user must be prompted and a file name input. DO NOT hardcode a file name.

- Read the words in the file, placing them in an array of struct with capacity I 00, where each struct has a string (the word) and an int (number of occurrences)

- Sort the array, eliminating duplicates

- Report the results

- You must write appropriate functions for each task. At minimum, you must write a function for each of the following:

• Open the file:

o    Pass in an ifstream (must be a reference argument [what type of parameter is it?]). The function prompts the user and, if the file is found, it returns true and the ifstream will be a handle for that text file. Otherwise the function returns false , and the argument is assumed to be undefined.

• Populate the array of struct with the words in the file:

o    Pass in two reference arguments, the ifstrcam, and the l 00 element array of word/count structs. When the function completes, the array will hold the words in the file.

• Output results:

o    Pass in the variables that bold the file name and the word/count array. Use this data to

produce the desired ouput, which should be appropriately fonnatted.

• Sort an array of structs (the name/int pairs), eliminating duplicates:

o    Pass in the array of struct, and the number of elements in the array. The function sorts the array, in ascending order of words, eliminating duplicates and tabulating counts as it goes. It definitely uses other functions for specific purposes, e.g. identifying duplicate tokens and swapping structs.

• Increment the counter member of a struct that holds a word and its multiplicity:

o    Pass in a single struct; it will be an import/export parameter. Simply increment its counter member.

----------------------------------------------------------------------------

Notes:

» A word, or token, is whatever is read using the >> operator. A word followed by a period is distinct from the same word without the period. Words are also case sensitive, i.e. heLLo is not equal to Hello.

» When a word is placed into the array of struct, its counter is initially 1.

» When the array reaches capacity:

If there aren't 100 unique words already in the array, run the sort function to eliminate duplicates.

If the file has 100 unique words, then after the tooth unique word is added to the array, only repeats will be tabulated. New tokens will be discarded.

» While several functions are required, other functions should be written as well.

No function..should handle multiple tasks on its own. Non-modular designs will be penalized.

» In sorting, if the word being placed is a duplicate, the already placed word must have its counter incremented, and the duplicate must be removed from the array.

- The program must be well written, properly indented, and commented

In: Computer Science

Write a program in a script file that creates m × n matrix with elements that...

  1. Write a program in a script file that creates m × n matrix with elements that have the following values. The value of each element in the last row is the number of the column. The value of each element in the last column is the number of row +1. For the rest of the elements, each has a value equal to the sum of the element below it and the element to the right.

In: Computer Science

You have been tasked with reconfiguring the network for your company, which has grown considerably over...

You have been tasked with reconfiguring the network for your company, which has grown considerably over the past year. You have used only static routing in the past, but you do not wish to spend the administrative time required to maintain the routing tables now that the network has grown. You have recently experienced numerous inaccuracies in the routing table caused by entries you made when in a hurry.

Criteria for the reconfiguration includes the following:

  • You would like to automate the entry and updating of routing information, but you are concerned about excessive memory and processor utilization if you implement dynamic routing protocols.
  • You also wish to minimize the use of network bandwidth.
  • You prefer that the most efficient use of bandwidth be made so that packets will travel to their destination over the truly shortest path, rather than just the path with the lowest number of hops.
  • You have heard that routing loops can be a problem and wish to avoid them. However, you are concerned that if a link goes down, there should be redundancy so that traffic will go through.

In 2-4 page summary, complete the following

  • How can you accomplish your objectives?
  • What routing protocols and protocol features will you use to do so?
  • Provide detailed examples.

Write a paper using the APA style that summarizes your findings, and provides enough detail to fully support your opinion.

Please provide the answers to questions in bold and please don't copy from other posts.

In: Computer Science

Suppose nodes A and B are each behind their own NAT firewall (9.7 Network Address Translation)....

Suppose nodes A and B are each behind their own NAT firewall (9.7 Network Address Translation).

A ──── NAT_A ──── Internet ──── NAT_B ──── B

A and B attempt to connect to one another simultaneously, using TCP. A sends to the public IPv4 address of NAT_B, and vice-versa for B. Assume that neither NAT_A nor NAT_B changes the port numbers in outgoing packets, at least for the packets involved in this connection attempt. Show that the connection succeeds. (Note that, because A has already sent a packet to B at the time B’s packet to A arrives at NAT_A, the latter packet is allowed through, and is delivered to A.)

In: Computer Science

Search for followings CVEs and list in order of CVSS and describe the vulnerabilities and how...

Search for followings CVEs and list in order of CVSS and describe the vulnerabilities and how to address these vulnerabilities.

CVE

Explanation with CVSS Score.

How you will address this vulnerability?

CVE-2017-11882

CVE-2017-17215

CVE-2019-2725

CVE-2017-0143

CVE-2014-8361

In: Computer Science

Create a file named Good1 nano Good1 Type Welcome in the file and save it. What...

  1. Create a file named Good1

nano Good1

Type Welcome in the file and save it.

  1. What command gives you a long listing of your filenames in the current directory, including permissions attached to each file.
  2. What command would you use to change a file’s permissions to include read, write and execute permission for the owner of the file only.
  3. Explain the following file permissions

   a) 777

         b) 765

         c) 400

         d) 666

         e) 600

         f) 444

  1. Create a shell script named script1 to perform the following task
    1. Print the current date
    2. Print the current working directory
    3. Print the calendar.

In: Computer Science

assigsment-Write a program to simulate a bank transaction. There are two bank accounts: checking and savings....

assigsment-Write a program to simulate a bank transaction. There are two bank accounts: checking and savings. First, ask for the initial balances of the bank accounts; reject negative balances. Then ask for the transactions; options are deposit, withdrawal, and transfer. Then ask for the account; options are checking and savings. Then ask for the amount; reject transactions that overdraw an account. At the end, print the balances of both accounts. in c++

work done- output and need help with the if statement for withdraw,deposit,transfer

In: Computer Science

PLEASE WRITE IN PYTHON A sequence of integers is said to be Fibonacci-like if each element...

PLEASE WRITE IN PYTHON A sequence of integers is said to be Fibonacci-like if each element of the sequence (except the first two elements) is the sum of the previous two integers in the sequence. For example, the sequence 10, 14, 24, 38, 62, 100, 162, 262 is Fibonacci-like. Note that the first two integers in the above sequence are arbitrary. Each of the remaining integers is the sum of the two integers just before it in the sequence. For example, 24 = 10 + 14, 38 = 14 + 24, 62 = 24 + 38, and so on. Your program must query ‘‘Enter the sequence.’’. The user will input integers separated by a ’,’. There could be arbitrary amount of blank space between two successive numbers. Your program must read in the user input and determine if the sequence is Fibonacci-like or not by outputting respectively, ‘‘The sequence is Fibonacci-like.’’ or ‘‘The sequence is NOT Fibonacci-like.’’

In: Computer Science

You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your...

You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your program will use two constant strings. One will represent the code for encryption: going from the original message (called the plaintext) to the encrypted version of the message. The other will be “abcdefghijklmnopqrstuvwxyz” (the lowercase alphabet. Your program will ask the user whether they want to 1) encrypt a message, 2) decrypt a message, or 3) quit. If they choose encrypt or decrypt, you will then get the message from the user and change it to all lower case. Then you will print out the encrypted or decrypted message character by character, using the information in the code to be used for encryption or decryption. The String you will use for encryption is “csimuylangpwzfrxbvhdtejqko”.

***Java language***

In: Computer Science

2.7 Explaining basic networking concepts Basics of network communication Device addresses Basic protocols 2.8 Scenario to...

2.7 Explaining basic networking concepts

  • Basics of network communication
  • Device addresses
  • Basic protocols

2.8 Scenario to install, configure and secure a basic wireless network

Best Practices

3.1 Explaining the purpose of operating systems

  • The interface between applications and hardware
  • Disk management
  • Process management/scheduling
  • Application management
  • Memory management
  • Device management
  • Access control/protection

In: Computer Science

3.2 Comparing and contrasting components of an operating system File systems and features Features File management...

3.2 Comparing and contrasting components of an operating system

  • File systems and features
  • Features
  • File management
  • Services
  • Processes
  • Drivers
  • Utilities
  • Interfaces

In: Computer Science

A person writes a project with unit conversion functions, although she doesn’t use all of them....

A person writes a project with unit conversion functions, although she doesn’t use all of them. The conversions would be useful in a library. Create the library and modify the main.c to use the library. What is the name of your library?

#include <stdio.h> // has printf()

float inches2metres(float length_in_inches);

float metres2inches(float length_in_metres);

float pounds2kg(float weight_in_pounds);

float kg2pounds(float mass_in_kg);

float hours2seconds(float time_in_hours);

float seconds2hours(float time_in_seconds);

int main(void){

int i;

float speed_mperhour, speed_inchespersec;

printf(“speed (km/hr)        speed (in/sec) \n\r”);

for (i=1; i<=100;i++)

{

      speed_inchespersec = metres2inches(i*1000.0)/hours2seconds(1.0);

      printf(“%f          %f \n\r”, i, speed_inchespersec);

}

return 0;

float inches2metres(float length_in_inches){

return (length_in_inches * 0.0254); // answer in metres

float metres2inches(float length_in_metres){

return (length_in_metres * 39.3701); // answer in inches

float pounds2kg(float weight_in_pounds){

return (weight_in_pounds * 0.453592); // answer in kilograms

float kg2pounds(float mass_in_kg){

return (mass_in_kg * 2.20462) // answer in pounds

float hours2seconds(float time_in_hours){

return (time_in_hours * 3600.0) // answer is seconds

float seconds2hours(float time_in_seconds){

return (time_in_seconds / 3600.0) // answer is hours

In: Computer Science