用mathematica求解数学题!!紧急悬赏!! 70

用1到9这九个数组成等式()/()()+()/()()+()/()()=1用1至9这9个数字怎么组合相加后等于1,不可以重复使用数字Thetitelalreadysays... 用1到9这九个数组成等式( )/( )( )+( )/( )( )+( )/( )( )=1
用1至9这9个数字怎么组合相加后等于1,不可以重复使用数字
The titel already says everything. Given all the numbers (1,2,3,4,5,6,7,8,9) find a sum of fractions that combines to 1. There is no constraint on the number of fractions you use (although 4 is the maximum given the amount of numbers) and you can only use every number once!

Your assignment
- Write a program that gives as many possible solutions as possible
- Try a different number set, for instance hexadecimals

急求啊!!!!!!!!!!
发送至邮箱yinhe_yikongjian@sina.com 追加悬赏哦~~~ 不要打上来 直接发到邮箱!
展开
 我来答
xzcyr
2012-12-07 · TA获得超过3400个赞
知道大有可为答主
回答量:1400
采纳率:100%
帮助的人:672万
展开全部
三年前的问题……我干嘛还要来答哟……而且这题面不清啊,分母上的那个,是相乘还是两数连接呢?如果是相乘的话:
Select[Permutations@Range@9, Apply[(#1)/((#2) (#3)) + (#4)/((#5) (#6)) + (#7)/((#8) (#9)) &, #] == 1 &]

得到满足条件的解有:
{{1, 3, 6, 5, 8, 9, 7, 2, 4}, {1, 3, 6, 5, 8, 9, 7, 4, 2}, {1, 3, 6, 5, 9, 8, 7, 2, 4}, {1, 3, 6, 5, 9, 8, 7, 4, 2}, {1, 3, 6, 7, 2, 4, 5, 8, 9}, {1, 3, 6, 7, 2, 4, 5, 9, 8}, {1, 3, 6, 7, 4, 2, 5, 8, 9}, {1, 3, 6, 7, 4, 2, 5, 9, 8}, {1, 6, 3, 5, 8, 9, 7, 2, 4}, {1, 6, 3, 5, 8, 9, 7, 4, 2}, {1, 6, 3, 5, 9, 8, 7, 2, 4}, {1, 6, 3, 5, 9, 8, 7, 4, 2}, {1, 6, 3, 7, 2, 4, 5, 8, 9}, {1, 6, 3, 7, 2, 4, 5, 9, 8}, {1, 6, 3, 7, 4, 2, 5, 8, 9}, {1, 6, 3, 7, 4, 2, 5, 9, 8}, {5, 8,9, 1, 3, 6, 7, 2, 4}, {5, 8, 9, 1, 3, 6, 7, 4, 2}, {5, 8, 9, 1, 6, 3, 7, 2, 4}, {5, 8, 9, 1, 6, 3, 7, 4, 2}, {5, 8, 9, 7, 2, 4, 1, 3, 6}, {5, 8, 9, 7, 2, 4, 1, 6, 3}, {5, 8, 9, 7, 4, 2, 1, 3, 6}, {5, 8, 9, 7, 4, 2, 1, 6, 3}, {5, 9, 8, 1, 3, 6, 7, 2, 4}, {5, 9, 8, 1, 3, 6, 7, 4, 2}, {5, 9, 8, 1, 6, 3, 7, 2, 4}, {5, 9, 8, 1, 6, 3, 7, 4, 2}, {5, 9, 8, 7, 2, 4, 1, 3, 6}, {5, 9, 8, 7, 2, 4, 1, 6, 3}, {5, 9, 8, 7, 4, 2, 1, 3, 6}, {5, 9, 8, 7, 4, 2, 1, 6, 3}, {7, 2, 4, 1, 3, 6, 5, 8, 9}, {7, 2, 4, 1, 3, 6, 5, 9, 8}, {7, 2, 4, 1, 6, 3, 5, 8, 9}, {7, 2, 4, 1, 6, 3, 5, 9, 8}, {7, 2, 4, 5, 8, 9, 1, 3, 6}, {7, 2, 4, 5, 8, 9, 1, 6, 3}, {7, 2, 4, 5, 9, 8, 1, 3, 6}, {7, 2, 4, 5, 9, 8, 1, 6, 3}, {7, 4, 2, 1, 3, 6, 5, 8, 9}, {7, 4, 2, 1, 3, 6, 5, 9,
8}, {7, 4, 2, 1, 6, 3, 5, 8, 9}, {7, 4, 2, 1, 6, 3, 5, 9, 8}, {7, 4, 2, 5, 8, 9, 1, 3, 6}, {7, 4, 2, 5, 8, 9, 1, 6, 3}, {7, 4, 2, 5, 9, 8, 1, 3, 6}, {7, 4, 2, 5, 9, 8, 1, 6, 3}}

如果是连接的话:
Select[Partition[#, 3] & /@ Permutations@Range@9,
Total@Apply[(#1)/ToExpression[10 #2 + #3] &, #, {1}] == 1 &]
得到满足条件的解有:
{{{5, 3, 4}, {7, 6, 8}, {9, 1, 2}},
{{5, 3, 4}, {9, 1, 2}, {7, 6, 8}},
{{7, 6, 8}, {5, 3, 4}, {9, 1, 2}},
{{7, 6, 8}, {9, 1, 2}, {5, 3, 4}},
{{9, 1, 2}, {5, 3, 4}, {7, 6, 8}},
{{9, 1, 2}, {7, 6, 8}, {5, 3, 4}}}
匿名用户
2009-12-29
展开全部
9/12+7/68+5/34=1
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式