Logarithmic's blog

By Logarithmic, history, 3 years ago, In English,

I faced this problem. I dont know how to formulate this as min cost flow problem:

A rental company uses cars which it leases from manufacturers. The company has a requirement of cars for the next 6 months as follows: Mar: 43 Apr: 41 May: 44 June: 39 July: 42 Aug: 45

The company can lease cars for the following costs and lengths of time: a 3-month lease for $1700, a 4-month lease for $2200, a 5-month lease for $2600. The company can undertake a lease beginning in any month. On March 1 the company has 20 cars on lease, all of which go off lease at the end of April.Formulate the problem of determining the most economical leasing policy as a mincost flow problem.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Logarithmic, history, 3 years ago, In English,

Given a range (l, r) where 0.0 <= l,r <= 1.0 we want to find a fraction x/y which satisfies following condition: l <= x/y < r and y should be as small as possible. l and r might have at most 9 digits after floating point.

Read more »

 
 
 
 
  • Vote: I like it
  • +18
  • Vote: I do not like it

By Logarithmic, history, 3 years ago, In English,

Given 3 points of triangle, one of them is origin, coordinates of the other 2 are positive integers. I want to find the leftmost point inside triangle(could be on the edges of triangle). x_i, y_i <= 10^9. Is there any algorithm to solve this problem?

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it