[algogeeks] dp problem

2012-04-13 Thread UTKARSH SRIVASTAV
how to solve these type of problems http://www.spoj.pl/problems/GNY07H/ means how to approach this problem by dp. -- *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

[algogeeks] Dp problem

2011-04-04 Thread rajat ahuja
You have to paint N boards of length {B1, B2, B3… BN}. There are K painters available and you are also given how much time a painter takes to paint 1 unit of board. You have to get this job done as soon as possible under the constraints that any painter will only paint continuous sections of

Re: [algogeeks] Dp problem

2011-04-04 Thread arun kumar
i think this problem can be solved by binary search correct me if i m wrong On Mon, Apr 4, 2011 at 2:36 PM, rajat ahuja catch.rajatah...@gmail.com wrote: You have to paint N boards of length {B1, B2, B3… BN}. There are K painters available and you are also given how much time a painter takes to

Re: [algogeeks] Dp problem

2011-04-04 Thread Rakib Ansary Saikot
I didnt quite get this problem. Sample case? On 4/4/11, rajat ahuja catch.rajatah...@gmail.com wrote: You have to paint N boards of length {B1, B2, B3… BN}. There are K painters available and you are also given how much time a painter takes to paint 1 unit of board. You have to get this job

Re: [algogeeks] Dp problem

2011-04-04 Thread rajat ahuja
like u hav boards of length of length 7 2 6 9 4 and u hav 3 painters who can work ||ly so now one way to distribute is (7 )(2 6 9) (4) so time in ths case is 17 suppose we do (7 2)(6)(9 4) time in ths case is 13 or i can do (7 2)(6 9 )(4) time in ths case is 15 i m takin 1 unit time to paint one

Re: [algogeeks] Dp problem

2011-04-04 Thread Munish Goyal
I think we can do it this way. Sum(all boards length) / K = A ( tentative avg. lenght to be painted by each painter) Now start from B1, and keep going further till Bi, till Sum(B1-Bi) is less than A. So this goes to painter P1. Same way for P2, start from i+1 till j. Condition: If i+1 itself

Re: [algogeeks] Dp problem

2011-04-04 Thread rajat ahuja
then please share wid me yaar thanks in advance On Mon, Apr 4, 2011 at 4:30 PM, Manmeet Singh mans.aus...@gmail.com wrote: Simple Dp On Mon, Apr 4, 2011 at 3:33 PM, Munish Goyal munish.go...@gmail.comwrote: I think we can do it this way. Sum(all boards length) / K = A ( tentative avg.

Re: [algogeeks] Dp problem

2011-04-04 Thread arun kumar
read topcoder tutorial binary search...u will get an idea On Mon, Apr 4, 2011 at 4:38 PM, rajat ahuja catch.rajatah...@gmail.com wrote: then please share wid me yaar thanks in advance On Mon, Apr 4, 2011 at 4:30 PM, Manmeet Singh mans.aus...@gmail.com wrote: Simple Dp On Mon, Apr 4, 2011

[algogeeks] DP Problem: minimum Cost

2010-12-30 Thread Akash Agrawal
You have different bundles of balls, which have different number of balls and different price tags. You have unlimited supplies of each of these bundles. Now if I want to get x number of balls, how should I choose bundles which cost me minimum. I am just looking for cost to be minimum, doesn't

Re: [algogeeks] DP problem

2010-12-17 Thread Amir hossein Shahriari
sort jewelries in decreasing order and then the problem can be solved in a way similar to subset sum problem On Mon, Dec 13, 2010 at 7:40 PM, Akash Agrawal akash.agrawa...@gmail.comwrote: You have been given a list of jewelry items that must be split amongst two people: Frank and Bob. Frank

Re: [algogeeks] DP problem

2010-12-17 Thread Akash Agrawal
Hey Amir, Can u please throw some more light on this. I am not able to find a good solution for subset sum problem as well. Regards, Akash Agrawal http://tech-queries.blogspot.com/ On Fri, Dec 17, 2010 at 7:29 PM, Amir hossein Shahriari amir.hossein.shahri...@gmail.com wrote: sort jewelries

[algogeeks] DP problem

2010-12-13 Thread Akash Agrawal
You have been given a list of jewelry items that must be split amongst two people: Frank and Bob. Frank likes very expensive jewelry. Bob doesn't care how expensive the jewelry is, as long as he gets a lot of jewelry. Based on these criteria you have devised the following policy: 1) Each piece of

[algogeeks] DP problem

2010-10-22 Thread Anand
Counting Boolean Parenthesizationshttp://people.csail.mit.edu/bdean/6.046/dp/. You are given a boolean expression consisting of a string of the symbols 'true', 'false', 'and', 'or', and 'xor'. Count the number of ways to parenthesize the expression such that it will evaluate to true. For example,

[algogeeks] DP problem

2007-11-27 Thread John
Algorithm for finding out the longest palindrome in a given string using dynamic programming --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to