Resolve/Reduce is taking forever
- To: mathgroup at smc.vnet.net
- Subject: [mg67217] Resolve/Reduce is taking forever
- From: "Bonny Banerjee" <banerjee at cse.ohio-state.edu>
- Date: Tue, 13 Jun 2006 01:07:01 -0400 (EDT)
- Organization: Ohio State University
- Sender: owner-wri-mathgroup at wolfram.com
I am trying to write a simple function that determines the conditions for a curve to be on the left of a straight line. A curve is to the left of a straight line if each point on the curve is to the left of the straight line. The curve is specified using parametric equations: x -> a3×t^3 + a2×t^2 + a1×t + a0 y -> b1×t + b0 where t is the parameter, 0<=t<=1, and {a0, a1, a2, a3, b0, b1} are real coefficients. The straight line is specified using two points {x1,y1} and {x2,y2}. Here is the function: isLeftofLine[{x1_, y1_}, {x2_, y2_}, {a0_, a1_, a2_, a3_, b0_, b1_}] = Resolve[ ForAll[t, 0 <= t <= 1 => fxy[{x1, y1}, {x2, y2}, {a3×t^3 + a2×t^2 + a1×t + a0, b1×t + b0}] <= 0], {a0, a1, a2, a3, b0, b1}, Reals] where fxy[{x1_, y1_}, {x2_, y2_}, {x_, y_}] = (x - x1)×(y2 - y1) - (y - y1)×(x2 - x1) I tried Resolve and Reduce but both are taking forever. I waited for more than 4 hours but could not get any result from any of them. Considering this is a simple logical expression with only one universal quantifier, I am surprised at what might be taking so long. Any insights would be very helpful. Also, any alternative method for solving the same problem, such as using any other function in place of Reduce/Resolve or using a different representation for the curve or straight line, would be nice to know. I preferred using parametric equations for representing the curve as the curve is finite. Thanks, Bonny.
- Follow-Ups:
- Re: Resolve/Reduce is taking forever
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Resolve/Reduce is taking forever