Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C language please. Me School of Computing and Information Systems comp10002 Foundations of Algorithms Semester 2, 2018 Assignment 1 Learning Outcomes In this project you

C language please.
image text in transcribed
image text in transcribed
Me School of Computing and Information Systems comp10002 Foundations of Algorithms Semester 2, 2018 Assignment 1 Learning Outcomes In this project you will demonstrate your understanding of arrays, strings, and functions. You may also use typedets and structs if you wish (see Chapter 8) - and will probably find the program easier to assemble if you do-but you are not required to use them in order to obtain full marks. You should not make any use of malloc) (Chapter 10) or file operations (Chapter 11) in this project. Superstring Assembly Suppose that multiple copies of a long string are cut up into much smaller pieces. If you are given the available fragments, is it possible to rebuild the larger string? For example, if the original string was "algorithnsarefunfunfun", and you got given a list of fragments like "refun and "unfun" "rith" and "1go" and so on, plus lots more small fragments, could you rebuild the original string? Probably you could, right? But what about if the original string was millions of characters long, like War and Peace? Or billions of characters long, like your genetic sequence? Let's ask a slightly different question now: if you got given a set of small string fragments each from a larger string that you didn't know anything about, could you at least find the shortest string in which every supplied fragment occurs at least once? This problem is known as the shortest superstring problem, and can be thought of as having parameters rn, the number of string fragments provided, and m, the total length of those string fragments. The shortest superstring problem is very important in bioinformatics, where genome reassembly from short fragments called reads helps contribute to our understanding of the behavior of organisms. Unfortunately, finding optimal solutions to the shortest superstring problem has been shown to be very challenging, and falls into a family of intractable problems that we'll talk about later in the semester. In this project you will implement some approximation techniques that generate non-optimal superstrings from a collection of string fragments. Input Data Input to your program will (always) come from stdin, and will (always) consist of strictly lower-case alphabetic strings, one per input line, each line terminated by a single newline 'In' character. Be sure to read the message on the FAQ page about newlines. For example, the following file testo.txt containing six fragments is a valid input: ctag 2 gtacctacta J cgatgco As you develop your program according to the stages listed below, the output will evolve. Full output examples for this and two other test files are linked from the FAQ page. You should also check your program against other inputs too; and can easily generate your own tests using a text editor. Testing and debugging is your responsibility

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

Students also viewed these Databases questions

Question

Construct a PDA for the language of strings of the form 0 n 10 n .

Answered: 1 week ago

Question

KEY QUESTION Refer to columns 1 and 6 in the table for question

Answered: 1 week ago