CS1102 Lab2a, Qn3, Qn4-答重生
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 18 楼,当前显示第 11 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:duck (等级:7 - 出类拔萃,发帖:6205) 发表:2003-02-12 20:08:31  11楼 
aiyait seems i misunderstood the question, the formula is corrent if only 2 elements in a set is required.
If so, you are not able to get it
Even if to compute all set with only two elements, your algorithm is not able to get it.
24 = 2^3*3, by your formula, the number of sets are 4*2-1 = 7. In fact, it is {24}, {2, 12}, {3, 8}, {4, 6}, which is only 4.
:)

I am not going to pointing your mistake here. Anyway, read the question carefully.

I do not think this question is able to be solved by permutation and combination formula. Indeed, it is hard to solve it. In programming, we also consider complexity of an algorithm. Another bottleneck to this problem is that there may be about 1000,000 number to compute. Then how?
Think about it...
*签名档字数限制在200以内。
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 18 楼,当前显示第 11 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码