Haskell help!

Iavor S. Diatchki diatchki@cse.ogi.edu
Tue, 25 Mar 2003 12:45:39 -0800


hi,

i think you might find the following paper relevant:
"Algebrainc Dynamic Prorgamming"
by Robert Gigerich and Carsten Meyer
http://link.springer-ny.com/link/service/series/0558/papers/2422/24220349.pdf

bye
iavor

Weix, Rachel Lynn wrote:
> Hi,
>  
> I'm a college student trying to write a Haskell program, and I'm having
> some problems getting the correct output.  I need to write a program
> which will return a set of optimally aligned sequences, with "optimal"
> being defined as such: mismatch or space (represented by a "-") = -1;
> else 1 for every pair (see below for what a pair is)
>  
> An example set of sequences with an alignment of -3 is as follows:
>  
> sc-h-e-me
> icecream-
>  
> (s,i) are a pair, (c, c), etc.
>  
> For right now, I'm only returning a potential solution (vs. a set of
> solutions), and I'm having problems with any set of sequences that
> aren't the same length.  My results are listed below.  I don't want to
> include the code for now since it's about a page long (printed out) but
> was hoping maybe someone had an idea as to why I'm getting such odd
> results?  If code will help, I can exchange back and forth with whoever
> thinks they might be able to help me out.  Your help is much
> appreciated!
>  
> Rachel
>  
>  
> -- Each word/sequence you see has been predefined in my Haskell code
> -- This first example appears to work just fine
>  
> Main> printSeq icecream scheme
> 
> ("icecream", "scheme--")
> 
>  
> 
> Main> printSeq hate hatter
> 
> ("hat-e", "hatte")
> 
> 
> 
> Main> printSeq scheme saturn
> 
> ("scheme", "saatur")
> 
> 
> 
> Main> printSeq saturn scheme
> 
> ("saaturn", "scheme-")
> 
> 
> 
> Main> printSeq saturn hatter
> 
> ("saaturn", "hatter-")
> 
> 
> 
> Main> printSeq hatter saturn
> 
> ("hatter", "saatur")
> 
> 
> 
> Main> printSeq mad saturn
> 
> ("mad", "saa")
> 
> 
> 
> Main> printSeq hate hatter
> 
> ("hat-e", "hatte")
> 
> 
> 
> Main> printSeq snowball icecream
> 
> ("snowb-all", "icecream-")
> 
> 
> 
> Main> printSeq mad computer
> 
> ("--mad", "compu")
> 
>  
> 
> Main> printSeq mad snowball
> 
> ("mad", "sno")
> 
> 


-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================