智能算法矩阵问题 [英] Intelligent algorithm matrix question

查看:112
本文介绍了智能算法矩阵问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我需要构建一个算法,例如10,20,30这样的3个数字,并构建包含3个包含这个数字的正方形的新矩阵(用于例如,一个尺寸为2 * 5(槽总数为10)的正方形,其中包含每个槽10和更多一个尺寸为5 * 4(槽总和为20)的正方形......)希望构建每个这3个正方形中的大多数等边正方形中的一个和矩阵也希望是大多数等边形正方形,并且矩阵可以有1个空槽或从3个正方形槽中移除最多1个槽来做到这一点。

我怎么能做到这一点?!!?

任何一点从数学概念开始还是什么?

非常感谢!






简而言之,我如何根据规则为新的一个添加3个矩阵:

每一个3个矩阵需要添加到新矩阵作为方形多少接近等边方格。

新矩阵不能包含多于1个空/死区。

新矩阵可以删除3个矩阵之和的1个槽。

新矩阵需要最接近等边!!

现在问题更容易理解了吗?

再次感谢!

Hello
I need to build an algorithm that gets 3 numbers like 10,20,30 for example and build new matrix that contains 3 squares that contains this numbers(for example one square with size 2*5(slot sum is 10) that contains in every slot "10" and more one square with size 5*4(slot sum is 20) that......) in wish to build each one of this 3 squares most Equilateral square like and the matrix in wish to be most Equilateral square like too, and the matrix can have 1 empty slot or remove maximum 1 slot from the 3 squares sum of slot to do that.
How i can do this?!!?
Any point to start with like mathematical idea or something?
Thanks alot!



In short how i add 3 matrixes to new one by the rules:
Each one of the 3 matrices need to add to the new matrix as square how much close to Equilateral square.
The new matrix can't contain more than 1 empty/death slot.
The new matrix can delete 1 slot from the sum of the 3 matrixes to to that.
The new matrix need to be most close as can to Equilateral!!
Now the question more understandable?
again thanks!

推荐答案

首先,并非所有正方形等边?从你的新描述听起来你需要添加3个矩阵来制作一个矩阵,其条目是平方数:A + B + C = D,所以对于第一个条目a11 + b11 + c11 = d11和d11 = n ^ 2,一些人请看这里:http://www.purplemath.com/modules/mtrxadd.htm。
First, aren't all squares equilateral? From your new description sounds like you need to add 3 matrices to make a matrix whose entries are square numbers: A + B + C = D, so for the first entry a11 + b11 + c11 = d11 and d11 = n^2, for some n. Look here: http://www.purplemath.com/modules/mtrxadd.htm.


你可以创建一个多次分割数字的功能,看看哪一个给你一个偶数,只是一个想法。
You could make a function that divides the number a number of times and sees which one gives you an even number, just an idea though.


这篇关于智能算法矩阵问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆