Fill two dimensional list by meeting given conditions












1












$begingroup$



Suppose you have a 2D array - a list that exits in both x and y axis - which is 4 x 4, and you need to fill the table by putting numbers in it obeying following restrictions.





  1. Each cell is able to store a number that can be calculated according to its index. (Indexes start from [0,0])



    If a cell's index is [i, j] it can store a number calculated as one of the following ways.




    1. i x j + i - j


    2. i x j + j - i


    3. i ^ j


    4. j ^ i




  2. Each cell can carry at most multiplication of its adjacent cells. (horizonal and vertical)


  3. Each cell should be colored in a way all odds are of same color and all evens are of same color and two same colored cell cannot stand side by side vertically or horizontally.












share|improve this question







New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$








  • 2




    $begingroup$
    How do you define $0^0$?
    $endgroup$
    – hexomino
    Mar 29 at 9:59










  • $begingroup$
    Has a correct answer been given? If so, please don't forget to $color{green}{checkmark smalltext{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
    $endgroup$
    – Rubio
    yesterday
















1












$begingroup$



Suppose you have a 2D array - a list that exits in both x and y axis - which is 4 x 4, and you need to fill the table by putting numbers in it obeying following restrictions.





  1. Each cell is able to store a number that can be calculated according to its index. (Indexes start from [0,0])



    If a cell's index is [i, j] it can store a number calculated as one of the following ways.




    1. i x j + i - j


    2. i x j + j - i


    3. i ^ j


    4. j ^ i




  2. Each cell can carry at most multiplication of its adjacent cells. (horizonal and vertical)


  3. Each cell should be colored in a way all odds are of same color and all evens are of same color and two same colored cell cannot stand side by side vertically or horizontally.












share|improve this question







New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$








  • 2




    $begingroup$
    How do you define $0^0$?
    $endgroup$
    – hexomino
    Mar 29 at 9:59










  • $begingroup$
    Has a correct answer been given? If so, please don't forget to $color{green}{checkmark smalltext{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
    $endgroup$
    – Rubio
    yesterday














1












1








1


0



$begingroup$



Suppose you have a 2D array - a list that exits in both x and y axis - which is 4 x 4, and you need to fill the table by putting numbers in it obeying following restrictions.





  1. Each cell is able to store a number that can be calculated according to its index. (Indexes start from [0,0])



    If a cell's index is [i, j] it can store a number calculated as one of the following ways.




    1. i x j + i - j


    2. i x j + j - i


    3. i ^ j


    4. j ^ i




  2. Each cell can carry at most multiplication of its adjacent cells. (horizonal and vertical)


  3. Each cell should be colored in a way all odds are of same color and all evens are of same color and two same colored cell cannot stand side by side vertically or horizontally.












share|improve this question







New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$





Suppose you have a 2D array - a list that exits in both x and y axis - which is 4 x 4, and you need to fill the table by putting numbers in it obeying following restrictions.





  1. Each cell is able to store a number that can be calculated according to its index. (Indexes start from [0,0])



    If a cell's index is [i, j] it can store a number calculated as one of the following ways.




    1. i x j + i - j


    2. i x j + j - i


    3. i ^ j


    4. j ^ i




  2. Each cell can carry at most multiplication of its adjacent cells. (horizonal and vertical)


  3. Each cell should be colored in a way all odds are of same color and all evens are of same color and two same colored cell cannot stand side by side vertically or horizontally.









calculation-puzzle






share|improve this question







New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 29 at 9:54









DavisDavis

61




61




New contributor




Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Davis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 2




    $begingroup$
    How do you define $0^0$?
    $endgroup$
    – hexomino
    Mar 29 at 9:59










  • $begingroup$
    Has a correct answer been given? If so, please don't forget to $color{green}{checkmark smalltext{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
    $endgroup$
    – Rubio
    yesterday














  • 2




    $begingroup$
    How do you define $0^0$?
    $endgroup$
    – hexomino
    Mar 29 at 9:59










  • $begingroup$
    Has a correct answer been given? If so, please don't forget to $color{green}{checkmark smalltext{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
    $endgroup$
    – Rubio
    yesterday








2




2




$begingroup$
How do you define $0^0$?
$endgroup$
– hexomino
Mar 29 at 9:59




$begingroup$
How do you define $0^0$?
$endgroup$
– hexomino
Mar 29 at 9:59












$begingroup$
Has a correct answer been given? If so, please don't forget to $color{green}{checkmark smalltext{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
$endgroup$
– Rubio
yesterday




$begingroup$
Has a correct answer been given? If so, please don't forget to $color{green}{checkmark smalltext{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
$endgroup$
– Rubio
yesterday










2 Answers
2






active

oldest

votes


















1












$begingroup$

It turns out that this is




Impossible




Reasoning




The cell with index $[1,1]$ must contain the entry $ 1times 1 + 1 - 1 = 1^1 = 1$.

Now consider the cell with index $[0,1]$ which is adjacent to $[1,1]$. This must contain either
(i) $0 times 1 + 0 - 1 = -1$,
(ii) $0 times 1 + 1 - 0 = 1$
(iii) $0^1 = 0$
(iv) $1^0 = 1$

Now, (i), (ii) and (iv) are odd which would break rule 3.
However if we are in case (iii) then we break rule 2, since the cell with index $[1,1]$ can carry, at most, multiplication of its adjacent cells, which would be $0$ in this case.







share|improve this answer









$endgroup$













  • $begingroup$
    Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
    $endgroup$
    – trolley813
    Mar 29 at 10:20










  • $begingroup$
    @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
    $endgroup$
    – hexomino
    Mar 29 at 10:26










  • $begingroup$
    maybe, but you can fill the table partially. I'm now writing my "solution".
    $endgroup$
    – trolley813
    Mar 29 at 10:31



















0












$begingroup$

My "solution" (a lateral thinking answer)




__0 NaN 1 NaN
NaN 1 NaN 1
__1 NaN 4 NaN
NaN 1 NaN 9




Explanation




NaN meaning not-a-number (according to the rules, a cell does not has to contain a number, but rather can do so). All other rules are obviously complied (if a cell contains a number, it is of the 4 permitted ones; NaNs (and their products) are never greater than any number; you should color all "odd" cells blue, "evens" green and NaNs grey, since the latter are neither even nor odd).







share|improve this answer









$endgroup$














    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "559"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Davis is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f81129%2ffill-two-dimensional-list-by-meeting-given-conditions%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    It turns out that this is




    Impossible




    Reasoning




    The cell with index $[1,1]$ must contain the entry $ 1times 1 + 1 - 1 = 1^1 = 1$.

    Now consider the cell with index $[0,1]$ which is adjacent to $[1,1]$. This must contain either
    (i) $0 times 1 + 0 - 1 = -1$,
    (ii) $0 times 1 + 1 - 0 = 1$
    (iii) $0^1 = 0$
    (iv) $1^0 = 1$

    Now, (i), (ii) and (iv) are odd which would break rule 3.
    However if we are in case (iii) then we break rule 2, since the cell with index $[1,1]$ can carry, at most, multiplication of its adjacent cells, which would be $0$ in this case.







    share|improve this answer









    $endgroup$













    • $begingroup$
      Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
      $endgroup$
      – trolley813
      Mar 29 at 10:20










    • $begingroup$
      @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
      $endgroup$
      – hexomino
      Mar 29 at 10:26










    • $begingroup$
      maybe, but you can fill the table partially. I'm now writing my "solution".
      $endgroup$
      – trolley813
      Mar 29 at 10:31
















    1












    $begingroup$

    It turns out that this is




    Impossible




    Reasoning




    The cell with index $[1,1]$ must contain the entry $ 1times 1 + 1 - 1 = 1^1 = 1$.

    Now consider the cell with index $[0,1]$ which is adjacent to $[1,1]$. This must contain either
    (i) $0 times 1 + 0 - 1 = -1$,
    (ii) $0 times 1 + 1 - 0 = 1$
    (iii) $0^1 = 0$
    (iv) $1^0 = 1$

    Now, (i), (ii) and (iv) are odd which would break rule 3.
    However if we are in case (iii) then we break rule 2, since the cell with index $[1,1]$ can carry, at most, multiplication of its adjacent cells, which would be $0$ in this case.







    share|improve this answer









    $endgroup$













    • $begingroup$
      Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
      $endgroup$
      – trolley813
      Mar 29 at 10:20










    • $begingroup$
      @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
      $endgroup$
      – hexomino
      Mar 29 at 10:26










    • $begingroup$
      maybe, but you can fill the table partially. I'm now writing my "solution".
      $endgroup$
      – trolley813
      Mar 29 at 10:31














    1












    1








    1





    $begingroup$

    It turns out that this is




    Impossible




    Reasoning




    The cell with index $[1,1]$ must contain the entry $ 1times 1 + 1 - 1 = 1^1 = 1$.

    Now consider the cell with index $[0,1]$ which is adjacent to $[1,1]$. This must contain either
    (i) $0 times 1 + 0 - 1 = -1$,
    (ii) $0 times 1 + 1 - 0 = 1$
    (iii) $0^1 = 0$
    (iv) $1^0 = 1$

    Now, (i), (ii) and (iv) are odd which would break rule 3.
    However if we are in case (iii) then we break rule 2, since the cell with index $[1,1]$ can carry, at most, multiplication of its adjacent cells, which would be $0$ in this case.







    share|improve this answer









    $endgroup$



    It turns out that this is




    Impossible




    Reasoning




    The cell with index $[1,1]$ must contain the entry $ 1times 1 + 1 - 1 = 1^1 = 1$.

    Now consider the cell with index $[0,1]$ which is adjacent to $[1,1]$. This must contain either
    (i) $0 times 1 + 0 - 1 = -1$,
    (ii) $0 times 1 + 1 - 0 = 1$
    (iii) $0^1 = 0$
    (iv) $1^0 = 1$

    Now, (i), (ii) and (iv) are odd which would break rule 3.
    However if we are in case (iii) then we break rule 2, since the cell with index $[1,1]$ can carry, at most, multiplication of its adjacent cells, which would be $0$ in this case.








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 29 at 10:11









    hexominohexomino

    45.4k4139219




    45.4k4139219












    • $begingroup$
      Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
      $endgroup$
      – trolley813
      Mar 29 at 10:20










    • $begingroup$
      @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
      $endgroup$
      – hexomino
      Mar 29 at 10:26










    • $begingroup$
      maybe, but you can fill the table partially. I'm now writing my "solution".
      $endgroup$
      – trolley813
      Mar 29 at 10:31


















    • $begingroup$
      Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
      $endgroup$
      – trolley813
      Mar 29 at 10:20










    • $begingroup$
      @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
      $endgroup$
      – hexomino
      Mar 29 at 10:26










    • $begingroup$
      maybe, but you can fill the table partially. I'm now writing my "solution".
      $endgroup$
      – trolley813
      Mar 29 at 10:31
















    $begingroup$
    Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
    $endgroup$
    – trolley813
    Mar 29 at 10:20




    $begingroup$
    Actually it may be possible due to the fact that (according to the rules) rot13(rnpu pryy VF NOYR (be PNA) pbagnva n ahzore, ohg abg arprffnevyl FUBHYQ gb qb fb. Fbzr pryyf znl pbagnva ab ahzoref ng nyy (naq fb, abg orvat terngre guna nal bgure ahzoref, yvxr AnA va cebtenzzvat))
    $endgroup$
    – trolley813
    Mar 29 at 10:20












    $begingroup$
    @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
    $endgroup$
    – hexomino
    Mar 29 at 10:26




    $begingroup$
    @trolley813 That's quite an interesting take. Wouldn't it contravene the sentence "...you need to fill the table by putting numbers in it obeying following restrictions." in the opening paragraph?
    $endgroup$
    – hexomino
    Mar 29 at 10:26












    $begingroup$
    maybe, but you can fill the table partially. I'm now writing my "solution".
    $endgroup$
    – trolley813
    Mar 29 at 10:31




    $begingroup$
    maybe, but you can fill the table partially. I'm now writing my "solution".
    $endgroup$
    – trolley813
    Mar 29 at 10:31











    0












    $begingroup$

    My "solution" (a lateral thinking answer)




    __0 NaN 1 NaN
    NaN 1 NaN 1
    __1 NaN 4 NaN
    NaN 1 NaN 9




    Explanation




    NaN meaning not-a-number (according to the rules, a cell does not has to contain a number, but rather can do so). All other rules are obviously complied (if a cell contains a number, it is of the 4 permitted ones; NaNs (and their products) are never greater than any number; you should color all "odd" cells blue, "evens" green and NaNs grey, since the latter are neither even nor odd).







    share|improve this answer









    $endgroup$


















      0












      $begingroup$

      My "solution" (a lateral thinking answer)




      __0 NaN 1 NaN
      NaN 1 NaN 1
      __1 NaN 4 NaN
      NaN 1 NaN 9




      Explanation




      NaN meaning not-a-number (according to the rules, a cell does not has to contain a number, but rather can do so). All other rules are obviously complied (if a cell contains a number, it is of the 4 permitted ones; NaNs (and their products) are never greater than any number; you should color all "odd" cells blue, "evens" green and NaNs grey, since the latter are neither even nor odd).







      share|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        My "solution" (a lateral thinking answer)




        __0 NaN 1 NaN
        NaN 1 NaN 1
        __1 NaN 4 NaN
        NaN 1 NaN 9




        Explanation




        NaN meaning not-a-number (according to the rules, a cell does not has to contain a number, but rather can do so). All other rules are obviously complied (if a cell contains a number, it is of the 4 permitted ones; NaNs (and their products) are never greater than any number; you should color all "odd" cells blue, "evens" green and NaNs grey, since the latter are neither even nor odd).







        share|improve this answer









        $endgroup$



        My "solution" (a lateral thinking answer)




        __0 NaN 1 NaN
        NaN 1 NaN 1
        __1 NaN 4 NaN
        NaN 1 NaN 9




        Explanation




        NaN meaning not-a-number (according to the rules, a cell does not has to contain a number, but rather can do so). All other rules are obviously complied (if a cell contains a number, it is of the 4 permitted ones; NaNs (and their products) are never greater than any number; you should color all "odd" cells blue, "evens" green and NaNs grey, since the latter are neither even nor odd).








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 29 at 10:40









        trolley813trolley813

        1,14638




        1,14638






















            Davis is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Davis is a new contributor. Be nice, and check out our Code of Conduct.













            Davis is a new contributor. Be nice, and check out our Code of Conduct.












            Davis is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Puzzling Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f81129%2ffill-two-dimensional-list-by-meeting-given-conditions%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Identifying “long and narrow” polygons in with PostGISlength and width of polygonWhy postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?Adjusting polygons to boundary and filling holesDrawing polygons with fixed area?How to remove spikes in Polygons with PostGISDeleting sliver polygons after difference operation in QGIS?Snapping boundaries in PostGISSplit polygon into parts adding attributes based on underlying polygon in QGISSplitting overlap between polygons and assign to nearest polygon using PostGIS?Expanding polygons and clipping at midpoint?Removing Intersection of Buffers in Same Layers

            Masuk log Menu navigasi

            อาณาจักร (ชีววิทยา) ดูเพิ่ม อ้างอิง รายการเลือกการนำทาง10.1086/39456810.5962/bhl.title.447410.1126/science.163.3863.150576276010.1007/BF01796092408502"Phylogenetic structure of the prokaryotic domain: the primary kingdoms"10.1073/pnas.74.11.5088432104270744"Towards a natural system of organisms: proposal for the domains Archaea, Bacteria, and Eucarya"1990PNAS...87.4576W10.1073/pnas.87.12.4576541592112744PubMedJump the queueexpand by handPubMedJump the queueexpand by handPubMedJump the queueexpand by hand"A revised six-kingdom system of life"10.1111/j.1469-185X.1998.tb00030.x9809012"Only six kingdoms of life"10.1098/rspb.2004.2705169172415306349"Kingdoms Protozoa and Chromista and the eozoan root of the eukaryotic tree"10.1098/rsbl.2009.0948288006020031978เพิ่มข้อมูล