The no. of transformations = cost of (no. of replace operations + no. of deletes + no. of additions) / 2
where, cost of replace operation = 2 cost of delete/addition operation = 1 On May 22, 8:12 am, UTKARSH SRIVASTAV <usrivastav...@gmail.com> wrote: > then waht will be it's recurrence relation > > On Mon, May 21, 2012 at 10:44 AM, atul anand <atul.87fri...@gmail.com>wrote: > > > > > > > > > > > basically question is asking for edit distance with transposition > > implementation only. > > no need of adding delete,replace condition > > > On Mon, May 21, 2012 at 10:53 PM, rahul venkat <rahul911...@gmail.com>wrote: > > >> * given a number and its permutation, how can we find out the number of > >> transformations by which the number could be transformed into its > >> permutation ?* > >> * > >> * > >> *eg: 2315 and 5213 are given. 2315 can be transformed into 5213 in a > >> series of 2 transformations. first swap 2 and 3. then swap 3 and 5.* > >> * > >> * > >> *suggestions will be welcome .* > >> * > >> * > >> *with regards,* > >> *rahul* > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Algorithm Geeks" group. > >> To post to this group, send email to algogeeks@googlegroups.com. > >> To unsubscribe from this group, send email to > >> algogeeks+unsubscr...@googlegroups.com. > >> For more options, visit this group at > >>http://groups.google.com/group/algogeeks?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm Geeks" group. > > To post to this group, send email to algogeeks@googlegroups.com. > > To unsubscribe from this group, send email to > > algogeeks+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en. > > -- > *UTKARSH SRIVASTAV > CSE-3 > B-Tech 3rd Year > @MNNIT ALLAHABAD* -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.