brian bovril

889 Reputation

16 Badges

18 years, 299 days

MaplePrimes Activity


These are replies submitted by brian bovril

thanks Kitonum.

I agree Acer, I didn't frame the question well. Bearing in mind your comments I thought i could have a go, using my patented "sledgehammer approach" .

restart;
with(combinat);
DartSum := proc (Darts, Total)
local L, N, S, x;
 L := choose([seq(10, i = 1 .. Darts), seq(20, i = 1 .. Darts), seq(30, i = 1 .. Darts), seq(40, i = 1 .. Darts), seq(50, i = 1 .. Darts)], Darts):
N := nops(L);
 for x to N do
 S := add(i, i = L[x]);
if S <> Total
then next
else print(L[x])
 end if
 end do;
print("does not exist")
 end proc:

 
> DartSum(3, 150);

                                [50, 50, 50]
                              "does not exist"
> DartSum(4, 150);
                              [10, 40, 50, 50]
                              [20, 30, 50, 50]
                              [20, 40, 40, 50]
                              [30, 30, 40, 50]
                              [30, 40, 40, 40]
                              "does not exist"
> DartSum(5, 150);

                            [10, 10, 30, 50, 50]
                            [10, 10, 40, 40, 50]
                            [10, 20, 20, 50, 50]
                            [10, 20, 30, 40, 50]
                            [10, 20, 40, 40, 40]
                            [10, 30, 30, 30, 50]
                            [10, 30, 30, 40, 40]
                            [20, 20, 20, 40, 50]
                            [20, 20, 30, 30, 50]
                            [20, 20, 30, 40, 40]
                            [20, 30, 30, 30, 40]
                            [30, 30, 30, 30, 30]
                              "does not exist"

annoyingly  "does not exist" get printed when solutions clearly do exist

thanks for that.

it seems you supply a value for V (in this case 40) and it calculates theta. i really wanted the optimal V and theta but thats alright. explaining myself is not easy.

dt is dropping time for a coconut. its based on this problem but factoring in air resistance for monkey and coconut. 

http://www.maplesoft.com/support/help/Maple/view.aspx?path=MathApps/TheMonkeyAndTheCoconut

as you can see you can modify the angle and the speed. and if its not fast enough she'll fall in the river!

If I were the monkey, I would just climb the tree and get it, that’s what monkeys are good at! My monkey is highly athletic, jumping 60 m!!! . and it travels at 150km/hr!  Anyway to do otherwise would spoil the maths.

thanks for that.

it seems you supply a value for V (in this case 40) and it calculates theta. i really wanted the optimal V and theta but thats alright. explaining myself is not easy.

dt is dropping time for a coconut. its based on this problem but factoring in air resistance for monkey and coconut. 

http://www.maplesoft.com/support/help/Maple/view.aspx?path=MathApps/TheMonkeyAndTheCoconut

as you can see you can modify the angle and the speed. and if its not fast enough she'll fall in the river!

If I were the monkey, I would just climb the tree and get it, that’s what monkeys are good at! My monkey is highly athletic, jumping 60 m!!! . and it travels at 150km/hr!  Anyway to do otherwise would spoil the maths.

numeric_de_code3.mw

Thankyou Sir, for the code. it answers my initial Q.

But now I have another problem. I'm trying to optimize V and theta ST constraints (eq=0, horizontal distance travelled>=60) using Direct Search and i've had difficulties. (after output 26). 

numeric_de_code3.mw

Thankyou Sir, for the code. it answers my initial Q.

But now I have another problem. I'm trying to optimize V and theta ST constraints (eq=0, horizontal distance travelled>=60) using Direct Search and i've had difficulties. (after output 26). 

thx James.

I forgot to specify reals

thx James.

I forgot to specify reals

thx Kitonum

thx Kitonum

Hex_lattice.mw

Thanks Kitonum, works well.

I have attempted to modify your cose to get an interweving a lattice of equi triangles, but can seem to align them: see sheet

Hex_lattice.mw

Thanks Kitonum, works well.

I have attempted to modify your cose to get an interweving a lattice of equi triangles, but can seem to align them: see sheet

thx Acer. works well

thx Acer. works well

thx Pagan, works well

thx Pagan, works well

First 20 21 22 23 24 25 26 Page 22 of 26