• 2022-06-06
    在矩阵链乘法问题的动态规划算法中,给出计算部分的伪代码如下,空白处应填入 输入:矩阵维度数组[img=10x18]1803deec9fd8740.png[/img],矩阵个数[img=11x14]1803deeca88e3fd.png[/img]输出:最小标量乘法次数,分割方式追踪数组[img=30x19]1803deecb0fd8f4.png[/img]新建二维数组[img=90x25]1803deecb92ca01.png[/img]和[img=105x25]1803deecc186291.png[/img]初始化//动态规划for[img=29x19]1803deecc9c0bca.png[/img] dofor[img=132x21]1803deecd25f8ce.png[/img] do[img=92x23]1803deecdb5ccdb.png[/img]for[img=33x19]1803deece3c0eb3.png[/img] do[img=32x18]1803deeceb36543.png[/img] if[img=78x25]1803deecf39233a.png[/img] then[img=82x25]1803deecfbf59cb.png[/img][img=96x25]1803deed0372e83.png[/img]endendendendreturn[img=85x25]1803deed0b46cb8.png[/img]
    A: [img=414x25]1803deed15d68ae.png[/img]
    B: [img=375x25]1803deed1fef860.png[/img]
    C: [img=464x25]1803deed2a712a6.png[/img]
    D: [img=417x25]1803deed34eea64.png[/img]
  • D

    举一反三

    内容

    • 0

      已知f(x)=x,g([img=17x17]1802d21b997b485.png[/img],[img=17x17]1802d21ba1cbf7d.png[/img],[img=17x17]1802d21ba9a3897.png[/img])=[img=17x17]1802d21b997b485.png[/img]*([img=17x17]1802d21ba1cbf7d.png[/img] +1), 其中x,[img=17x17]1802d21b997b485.png[/img],[img=17x17]1802d21ba1cbf7d.png[/img] ,[img=17x17]1802d21ba9a3897.png[/img]均为自然数,新函数h可递归的构造如下:h(0,x) = f(x), 且h(S(n), x) = g(h(n,x),n,x),请按递归式进行计算下列式子,不正确的是_____。 A: h(1,x) = x B: h(2,x) = 2x C: h(3,x) = 6x D: h(4,x) = 12x

    • 1

      已知f(x)=x,g([img=17x17]1802ffed5cd7702.png[/img],[img=17x17]1802ffed659e489.png[/img],[img=17x17]1802ffed6deb061.png[/img])=[img=17x17]1802ffed5cd7702.png[/img]*([img=17x17]1802ffed659e489.png[/img] +1), 其中x,[img=17x17]1802ffed5cd7702.png[/img],[img=17x17]1802ffed659e489.png[/img] ,[img=17x17]1802ffed6deb061.png[/img]均为自然数,新函数h可递归的构造如下:h(0,x) = f(x), 且h(S(n), x) = g(h(n,x),n,x),请按递归式进行计算下列式子,不正确的是_____。 A: h(1,x) = x B: h(2,x) = 2x C: h(3,x) = 6x D: h(4,x) = 12x

    • 2

      已知f(x)=x,g([img=17x17]180386f1399f515.png[/img],[img=17x17]180386f1425fae9.png[/img],[img=17x17]180386f14b4a26d.png[/img])=[img=17x17]180386f1399f515.png[/img]*([img=17x17]180386f1425fae9.png[/img] +1), 其中x,[img=17x17]180386f1399f515.png[/img],[img=17x17]180386f1425fae9.png[/img] ,[img=17x17]180386f14b4a26d.png[/img]均为自然数,新函数h可递归的构造如下:h(0,x) = f(x), 且h(S(n), x) = g(h(n,x),n,x),请按递归式进行计算下列式子,不正确的是_____。 A: h(1,x) = x B: h(2,x) = 2x C: h(3,x) = 6x D: h(4,x) = 12x

    • 3

      已知f(x)=x,g([img=17x17]180344298c67be5.png[/img],[img=17x17]1803442994afbcb.png[/img],[img=17x17]180344299e76f5b.png[/img])=[img=17x17]180344298c67be5.png[/img]*([img=17x17]1803442994afbcb.png[/img] +1), 其中x,[img=17x17]180344298c67be5.png[/img],[img=17x17]1803442994afbcb.png[/img] ,[img=17x17]180344299e76f5b.png[/img]均为自然数,新函数h可递归的构造如下:h(0,x) = f(x), 且h(S(n), x) = g(h(n,x),n,x),请按递归式进行计算下列式子,不正确的是_____。 A: h(1,x) = x B: h(2,x) = 2x C: h(3,x) = 6x D: h(4,x) = 12x

    • 4

      已知f(x)=x,g([img=17x17]1803cc1b16b4a7b.png[/img],[img=17x17]1803cc1b1eeb12d.png[/img],[img=17x17]1803cc1b2724c65.png[/img])=[img=17x17]1803cc1b16b4a7b.png[/img]*([img=17x17]1803cc1b1eeb12d.png[/img] +1), 其中x,[img=17x17]1803cc1b16b4a7b.png[/img],[img=17x17]1803cc1b1eeb12d.png[/img] ,[img=17x17]1803cc1b2724c65.png[/img]均为自然数,新函数h可递归的构造如下:h(0,x) = f(x), 且h(S(n), x) = g(h(n,x),n,x),请按递归式进行计算下列式子,不正确的是_____。 A: h(1,x) = x B: h(2,x) = 2x C: h(3,x) = 6x D: h(4,x) = 12x