Skip to content

Solutions to the assignment of the Advanced Algorithms and Parallel Programming course @ Politecnico di Milano, A.Y. 2023/2024.

Notifications You must be signed in to change notification settings

kasch17/alignment_problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Alignment Problem

Overview

In this repository, you will find the code for the assignments of the Advanced Algorithms and Parallel Programming course I took during my MSc in Computer Science and Engineering @ Politecnico di Milano, during the A.Y. 2023/2024.

Assignment 1

Let’s assume we have two sequences of strings composed by any sequence of the following four characters: 'A', 'C', 'G', and 'T'.

  • Adenine (A)
  • Cytosine (C)
  • Guanine (G)
  • Thymine (T)

You would like to align those two sequences by inserting gaps or admitting differences.

  • Any time you have a gap, an '_' is inserted in one of the sequences. Any '_' adds a cost of 2 units to the final solution.
  • Any time you allow a difference, replace the two characters with a '*'. Any '*' adds a cost of 5 units to the final solution (10 on both strings).

Given two strings, X = x1 x2 ... xm, and Y = y1 y2 ... yn, write the algorithm that outputs the minimum cost-aligned strings. The two aligned strings generated have to have the same length.

Bonus

Given two numbers n and m, generate two strings composed of ‘A’, ‘T’, ‘G’, and ‘C’ characters that produce the maximum cost in the alignment problem. The gap and the replacement costs have to be parametric.

About

Solutions to the assignment of the Advanced Algorithms and Parallel Programming course @ Politecnico di Milano, A.Y. 2023/2024.

Resources

Stars

Watchers

Forks

Languages