Questions
For simplicity, you can consider DNA sequences as strings in the alphabet of {A, C, G,...

For simplicity, you can consider DNA sequences as strings in the alphabet of {A, C, G, T}. Implement a special hash table to store all short DNA segments of certain length (e.g., 20) found in a long DNA sequence. Every DNA segment is stored as a (key, value) pair, where the key is the sequence of the segment, and the value is the position of the segment in the DNA. For example given a DNA sequence of ACGTACGTTT, there are 3 segments of length 8, so the corresponding (key, value) pairs are: (ACGTACGT, 0), (CGTACGTT, 1), and (GTACGTTT, 2). Use open hash table for this challenge. DNA segments with different keys may be hashed to the same slot (collision) and if it happens, all these DNA segments will be put in a linked list in the corresponding slot. If the keys are of length 20, there will be a total of different DNA segments of 20 letters. A hash table with these many slots can be very sparse (many slots won't be occupied). To avoid this problem, you will use a hash function that computes the index for each key only based on the first few letters, e.g., the first 4 letters in each key. There are a total of unique DNA segments with 4 letters: AAAA, CAAA, GAAA, TAAA, ACAA, CCAA, GCAA, .... and TTTT, so any function that maps each of these segments into a unique integer (in the range of [0,255]) will work well as a hash function for a hash table that stores the DNA segments. Given the length of DNA segments and the number of letters used for hashing, and a DNA sequence, your program needs to compute the number of slots needed for the hash table, and the number of slots that are filled (non-empty) after putting the segments from the given DNA into the table.

Sample Input 0

8 4
ACGTACGTAC

Sample Output 0

256 3

Explanation 0

In this case, n = 8 and k = 4. The input DNA is ACGTACGTAC so there are three (key, value) pairs: ("ACGTACGT", 0), ("CGTACGTA", 1), and ("GTACGTAC", 2). As the hash function computes the index based on the first four (k=4) letters of each key, and there are a total of  (256) diffent combinations of four letters, the hash table only needs 256 slots. Out of the 256 slots, only three are occupied.

In Java Please

In: Computer Science

Java Questions involving OOP: (Include java coding examples if possible) (1) What is an exception type...

Java Questions involving OOP:

(Include java coding examples if possible)

(1) What is an exception type an instance of?

(2) What are the conditions when a class implements an interface?

(3) What is/are the conditions of creating an abstract class object from its derived concrete class?

In: Computer Science

Five processes A, B, C, D, E arrive at the same time in this order ($A$...

Five processes A, B, C, D, E arrive at the same time in this order ($A$ first, $E$ last).
They have estimated services times of 12u, 8u, 10u, 6u, 4u, where u is some unit of time.

(a) Show the scheduling order under
First-Come-First-Served (FCFS), Shortest Process Next (SPN),
Shortest Remaining Time (SRT) next, Round-Robin with quantum of 2u (RR2).

Note: Write BCADE to indicate the order of execution if you believe that B executes first, then C, then A, etc.

The problem continues with the following two questions.

(b) (2pt) What is the turnaround time for processes A and E under RR?


(c)   (3pt) What is the wait time spent on the ready queue for processes B, C, and D?

In: Computer Science

Explain how a stigma might affect children with learning disabilities and their families. Include at least...

Explain how a stigma might affect children with learning disabilities and their families. Include at least one perception that families might have about themselves or about their child as a result of stigmatization. Describe how that perception might impact the child's development in a specific way. Finally, suggest at least one strategy for promoting positive identity development in response to this stigma.

In: Psychology

Consider the matrix list x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Write...

  1. Consider the matrix list x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Write a list comprehension to extract the first column of the matrix [1, 4, 7]. Write another list comprehension to create a vector of twice the square of the middle column.

In: Computer Science

As the economy goes through highs and lows, investors with stock in various companies face significant...

As the economy goes through highs and lows, investors with stock in various companies face significant risk. How do you see the stock market affecting your own investing plans in the future? What types of risks do investors take? How can investors minimize their risk?

In: Accounting

Review the section on the definitions of maturity stages and dimension variables in the CEO Technology...

Review the section on the definitions of maturity stages and dimension variables in the CEO Technology Best Practices Arc. Define each of the maturity stages and performance dimensions. What are the key concepts from each section?

In: Operations Management

ghostbuster esp study film First, what was experimentally wrong with the Ghostbusters ESP study (video link)...

ghostbuster esp study film

First, what was experimentally wrong with the Ghostbusters ESP study (video link) at the end of your chapter one slideshow, and how could it be improved to meet scientific standards? Second, if you were doing this study, what would be your hypothesis, and what would your independent and dependent variables be (make sure to list and label them as IVs and DVs)? Be specific here! (“My independent variable would be …; My dependent variable would be …). Third, how would you make it an experimental (rather than correlational) study (it might help to be specific here as well and define the two types of studies in your response)? Finally, what are some of the ethical problems with this study?

In: Psychology

in paython You are going to make an advanced ATM program When you run the program,...

in paython

You are going to make an advanced ATM program

When you run the program, it will ask you if you want to:

  1. Either log in or make a new user

  2. Exit

Once I have logged in, I will have 3 balances, credit, checking, and savings. From here it will ask which account to use.

Once the account is picked they can deposit, withdraw, check balance, or log out.

Each time the user performs one of these actions, it will loop back and ask them for another action, until the Logout

(Hint: Make sure they can’t withdraw too much money)

Submission name: Advanced_ATM.py

(Capitalization matters for this, any non .py files will be -20 points)

Submit the file here by the assigned date, every day late will be 15 points off

In: Computer Science

How would you respond to this post? Material Requirements Planning (MRP) is the process used for...

How would you respond to this post?

Material Requirements Planning (MRP) is the process used for calculating the materials required to manufacture a product.  A common approach companies use is called just in case inventory which requires huge inventories to stock all materials needed for manufacturing a product before they are required (Vonderembse, 2013).  This process may sound like a great idea but is very costly in requiring extensive warehouse space and monies tied up in inventory.  If companies that utilize MRP they will be able to free up these costs without effecting deliveries to customers and also could provide these products at a lower cost.  The MRP is processed with a computerized information system that uses the information from the Master Schedule File, Bill of Materials File and Inventory file to determine a more precise amount of inventory to have on hand.

I work for Sharp Electronics Americas and when it pertains to MRP we need to be sure we have enough supplies and parts in stock for our USA Sales and Service Distributors.  In the past we used to utilize the just in case inventory process and have numerous warehouses throughout the United States.  We would also encourage our dealer chain to have an extra amount of inventory on hand as well.  About 5 years ago we partnered with a company called Tech Data which specializes in a more just in time logistics system.  They are able to take an order from one of our dealers and have it delivered to them in 24 to 48 hours.  Utilizing Tech Data allowed us to eliminate all of our warehouses, which saved us a tremendous amount of money.  This also allowed our dealers to not store and tie up resources stock pilling inventory.  We utilize SAP to process the correct amount of product to order from our factory and have in hand at the Tech Data warehouse facility.

In: Operations Management

python 3.6: You will have two functions: Function 1: update(user_dictionary): This function will take a dictionary...

python 3.6:

You will have two functions:

Function 1: update(user_dictionary): This function will take a dictionary entry as user that has keys, ‘username’,’password’,’uid’, and ‘gid’ along with values. You will search if the username is already in your user_list that you get from your userfile.json file that you have created in your previous task.

If the username in your user_dictionary is not in the list that is in your .json file then add the user_dictionary into the existing list and update your userfile.json with the new entry.

If the username in your user_dictionary isin the list that is in your .json file then just update the fields password,uid, and gid based on the information provided.

Function 2: delete(user_name): This function will take a username and remote entry associated with the user.

Previous Task Code:

#!/usr/bin/env python3.6
import pwd
import json

#Task 1
list=pwd.getpwall()
dictionary={}
print(list)
for i in range(len(list)):
with open('list.json','a') as f:
json.dump(list[i].pw_name,f)
json.dump(list[i].pw_passwd,f)

In: Computer Science

There is a well near your house with a 20kg cylindrical spool (with a radius of...

There is a well near your house with a 20kg cylindrical spool (with a radius of 0.5m), wrapped with rope, upon which you attach a 5kg bucket. you let the bucket fall into the well from rest. 10s later, you can hear the bucket hit the water at the botttom. A) Determine the tension in the string B) what is the linear acceleration of the bucket? C) What is the angular acceleration of the spool? D)How much torque was required to make the spook spin at this acceleration? E)How far does the bucket ravel when it reaches the water? F)Through how many radians does the spool spin in this time? G)What is the final angular velocity of the spool? H) What is the final linear velocity of the spool?

In: Physics

***** PLEASE solve using MATHCAD, I am unsure on how to solve properly with this application....

***** PLEASE solve using MATHCAD, I am unsure on how to solve properly with this application. Thank you so much!

Problem 7:

Design a Silicon diode that has a breakdown voltage =20V and has a junction capacitance of 1 pF at no biasing.

In: Electrical Engineering

Given the following sentences: All hounds howl at night. Anyone who has any cats will not...

Given the following sentences:

  1. All hounds howl at night.
  2. Anyone who has any cats will not have any mice.
  3. Light sleepers do not have anything which howls at night.
  4. John has either a cat or a hound.
  5. (Conclusion) If John is a light sleeper, then John does not have any mice.

Part 1:

  1. Translate into propositional logic sentences
  2. Convert the propositional sentences into Conjunctive Normal Form (CNF)

In: Computer Science

Define culture and discuss the primary characteristics of culture

Define culture and discuss the primary characteristics of culture

In: Psychology