Get permutation of a 2 Dimension array Matrix with trio stateOptimum Cutting of Rod with Length n into any of 3 possibly 4 sizesC# Permutation of an array of arraylists?I need to create 2D array in C#Generating permutations of a set (most efficiently)Combinations/ permutations of numbers in array c#Algorithm to find all possible binary combinations with a conditionGet Array from Array using specific algorithmic logicPermutations of numbers in arraygetting main diagonal of square matrix in linear representationPermutations with constant prefix numbers

How can I modify a line which contains 2nd occurence of a string?

Am I required to correct my opponent's assumptions about my morph creatures?

Heuristic argument for the Riemann Hypothesis

Was there an original and definitive use of alternate dimensions/realities in fiction?

Why wasn't Linda Hamilton in T3?

New coworker has strange workplace requirements - how should I deal with them?

Divide Numbers by 0

Can Russians naturally pronounce "попал в бесперспективняк"?

How did Gollum know Sauron was gathering the Haradrim to make war?

Blogging in LaTeX

Get rows that exist exactly once per day for a given period

How to solve this inequality , when there is a irrational power?

Table alignment (make the content centre)

Is torque as fundamental a concept as force?

D Scale Question

If the government illegally doesn't ask for article 50 extension, can parliament do it instead?

extending lines in 3d graph

Turn off Google Chrome's Notification for "Flash Player will no longer be supported after December 2020."

Are there consequences for not filing a DMCA (any country)

Displaying Time in HH:MM Format

How to run a command 1 out of N times in Bash

What happens if you just start drawing from the Deck of Many Things without declaring any number of cards?

Function of the separated, individual solar cells on Telstar 1 and 2? Why were they "special"?

Would there be balance issues if I allowed opportunity attacks against any creature, not just hostile ones?



Get permutation of a 2 Dimension array Matrix with trio state


Optimum Cutting of Rod with Length n into any of 3 possibly 4 sizesC# Permutation of an array of arraylists?I need to create 2D array in C#Generating permutations of a set (most efficiently)Combinations/ permutations of numbers in array c#Algorithm to find all possible binary combinations with a conditionGet Array from Array using specific algorithmic logicPermutations of numbers in arraygetting main diagonal of square matrix in linear representationPermutations with constant prefix numbers






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I want to get the permutation of a 2D array with the following condition.



  1. the matrix has the same length and width of n element.


  2. the value of each element can either be 1 or 0.


  3. The value of i-th row and i-th column must 0. The others can be 0 or 1.


  4. If i represents the row number and j represents the column number. matrix[i, j] and matrix [j, i] can be either one value is 0 and another is 1, or both are 0. for example, for matrix[1, 2] and matrix[2, 1]. there are only three possibility of combination.


matrix[1, 2] = 0, matrix[2, 1] = 0



matrix[1, 2] = 0, matrix[2, 1] = 1



matrix[1, 2] = 1, matrix[2, 1] = 0



If n = 3, it should have the following combination.



0 0 0

0 0 0

0 0 0



0 1 0

0 0 0

0 0 0



0 1 1

0 0 0

0 0 0



0 1 1

0 0 1

0 0 0



0 0 0

1 0 0

0 0 0



0 0 0

1 0 0

1 0 0



0 0 0

1 0 0

1 1 0



0 0 0

1 0 0

1 1 0



0 0 1

1 0 0

0 1 0



0 1 0

0 0 0

1 1 0



0 0 0

1 0 1

1 0 0



0 1 0

0 0 1

1 0 0



How can I write the code to get the permutation of this n sized Matrix?
There is no need to display the result, you can just get the permutation.










share|improve this question





















  • 1





    How do you think you would solve the problem, what have you tried, what didnt it work? i mean surely you have an idea

    – TheGeneral
    Mar 28 at 1:09












  • @Michael Randall I am still thinking this question. No solution at the moment.

    – paddywide
    Mar 28 at 1:12






  • 1





    You really need to put a better example, and explain what you want a little better. i mean someone should be able to come here and see what you mean instantly. Can you put your inputs and outputs, and a bit more explanation

    – TheGeneral
    Mar 28 at 1:20











  • @paddywide - Please provide sample inputs (several) with the associated outputs - all as valid C# code. Then provide as much code as you can that transforms from the input to the output(s). And then we can help. Right now this is too much like hard work for me to even think about. If it's easy to answer then you get good answers.

    – Enigmativity
    Mar 28 at 1:38











  • I counted in mod 3 in answer a few weeks ago : stackoverflow.com/questions/55101245/…

    – jdweng
    Mar 28 at 2:11

















1















I want to get the permutation of a 2D array with the following condition.



  1. the matrix has the same length and width of n element.


  2. the value of each element can either be 1 or 0.


  3. The value of i-th row and i-th column must 0. The others can be 0 or 1.


  4. If i represents the row number and j represents the column number. matrix[i, j] and matrix [j, i] can be either one value is 0 and another is 1, or both are 0. for example, for matrix[1, 2] and matrix[2, 1]. there are only three possibility of combination.


matrix[1, 2] = 0, matrix[2, 1] = 0



matrix[1, 2] = 0, matrix[2, 1] = 1



matrix[1, 2] = 1, matrix[2, 1] = 0



If n = 3, it should have the following combination.



0 0 0

0 0 0

0 0 0



0 1 0

0 0 0

0 0 0



0 1 1

0 0 0

0 0 0



0 1 1

0 0 1

0 0 0



0 0 0

1 0 0

0 0 0



0 0 0

1 0 0

1 0 0



0 0 0

1 0 0

1 1 0



0 0 0

1 0 0

1 1 0



0 0 1

1 0 0

0 1 0



0 1 0

0 0 0

1 1 0



0 0 0

1 0 1

1 0 0



0 1 0

0 0 1

1 0 0



How can I write the code to get the permutation of this n sized Matrix?
There is no need to display the result, you can just get the permutation.










share|improve this question





















  • 1





    How do you think you would solve the problem, what have you tried, what didnt it work? i mean surely you have an idea

    – TheGeneral
    Mar 28 at 1:09












  • @Michael Randall I am still thinking this question. No solution at the moment.

    – paddywide
    Mar 28 at 1:12






  • 1





    You really need to put a better example, and explain what you want a little better. i mean someone should be able to come here and see what you mean instantly. Can you put your inputs and outputs, and a bit more explanation

    – TheGeneral
    Mar 28 at 1:20











  • @paddywide - Please provide sample inputs (several) with the associated outputs - all as valid C# code. Then provide as much code as you can that transforms from the input to the output(s). And then we can help. Right now this is too much like hard work for me to even think about. If it's easy to answer then you get good answers.

    – Enigmativity
    Mar 28 at 1:38











  • I counted in mod 3 in answer a few weeks ago : stackoverflow.com/questions/55101245/…

    – jdweng
    Mar 28 at 2:11













1












1








1


1






I want to get the permutation of a 2D array with the following condition.



  1. the matrix has the same length and width of n element.


  2. the value of each element can either be 1 or 0.


  3. The value of i-th row and i-th column must 0. The others can be 0 or 1.


  4. If i represents the row number and j represents the column number. matrix[i, j] and matrix [j, i] can be either one value is 0 and another is 1, or both are 0. for example, for matrix[1, 2] and matrix[2, 1]. there are only three possibility of combination.


matrix[1, 2] = 0, matrix[2, 1] = 0



matrix[1, 2] = 0, matrix[2, 1] = 1



matrix[1, 2] = 1, matrix[2, 1] = 0



If n = 3, it should have the following combination.



0 0 0

0 0 0

0 0 0



0 1 0

0 0 0

0 0 0



0 1 1

0 0 0

0 0 0



0 1 1

0 0 1

0 0 0



0 0 0

1 0 0

0 0 0



0 0 0

1 0 0

1 0 0



0 0 0

1 0 0

1 1 0



0 0 0

1 0 0

1 1 0



0 0 1

1 0 0

0 1 0



0 1 0

0 0 0

1 1 0



0 0 0

1 0 1

1 0 0



0 1 0

0 0 1

1 0 0



How can I write the code to get the permutation of this n sized Matrix?
There is no need to display the result, you can just get the permutation.










share|improve this question
















I want to get the permutation of a 2D array with the following condition.



  1. the matrix has the same length and width of n element.


  2. the value of each element can either be 1 or 0.


  3. The value of i-th row and i-th column must 0. The others can be 0 or 1.


  4. If i represents the row number and j represents the column number. matrix[i, j] and matrix [j, i] can be either one value is 0 and another is 1, or both are 0. for example, for matrix[1, 2] and matrix[2, 1]. there are only three possibility of combination.


matrix[1, 2] = 0, matrix[2, 1] = 0



matrix[1, 2] = 0, matrix[2, 1] = 1



matrix[1, 2] = 1, matrix[2, 1] = 0



If n = 3, it should have the following combination.



0 0 0

0 0 0

0 0 0



0 1 0

0 0 0

0 0 0



0 1 1

0 0 0

0 0 0



0 1 1

0 0 1

0 0 0



0 0 0

1 0 0

0 0 0



0 0 0

1 0 0

1 0 0



0 0 0

1 0 0

1 1 0



0 0 0

1 0 0

1 1 0



0 0 1

1 0 0

0 1 0



0 1 0

0 0 0

1 1 0



0 0 0

1 0 1

1 0 0



0 1 0

0 0 1

1 0 0



How can I write the code to get the permutation of this n sized Matrix?
There is no need to display the result, you can just get the permutation.







c#






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 2:38







paddywide

















asked Mar 28 at 1:03









paddywidepaddywide

126 bronze badges




126 bronze badges










  • 1





    How do you think you would solve the problem, what have you tried, what didnt it work? i mean surely you have an idea

    – TheGeneral
    Mar 28 at 1:09












  • @Michael Randall I am still thinking this question. No solution at the moment.

    – paddywide
    Mar 28 at 1:12






  • 1





    You really need to put a better example, and explain what you want a little better. i mean someone should be able to come here and see what you mean instantly. Can you put your inputs and outputs, and a bit more explanation

    – TheGeneral
    Mar 28 at 1:20











  • @paddywide - Please provide sample inputs (several) with the associated outputs - all as valid C# code. Then provide as much code as you can that transforms from the input to the output(s). And then we can help. Right now this is too much like hard work for me to even think about. If it's easy to answer then you get good answers.

    – Enigmativity
    Mar 28 at 1:38











  • I counted in mod 3 in answer a few weeks ago : stackoverflow.com/questions/55101245/…

    – jdweng
    Mar 28 at 2:11












  • 1





    How do you think you would solve the problem, what have you tried, what didnt it work? i mean surely you have an idea

    – TheGeneral
    Mar 28 at 1:09












  • @Michael Randall I am still thinking this question. No solution at the moment.

    – paddywide
    Mar 28 at 1:12






  • 1





    You really need to put a better example, and explain what you want a little better. i mean someone should be able to come here and see what you mean instantly. Can you put your inputs and outputs, and a bit more explanation

    – TheGeneral
    Mar 28 at 1:20











  • @paddywide - Please provide sample inputs (several) with the associated outputs - all as valid C# code. Then provide as much code as you can that transforms from the input to the output(s). And then we can help. Right now this is too much like hard work for me to even think about. If it's easy to answer then you get good answers.

    – Enigmativity
    Mar 28 at 1:38











  • I counted in mod 3 in answer a few weeks ago : stackoverflow.com/questions/55101245/…

    – jdweng
    Mar 28 at 2:11







1




1





How do you think you would solve the problem, what have you tried, what didnt it work? i mean surely you have an idea

– TheGeneral
Mar 28 at 1:09






How do you think you would solve the problem, what have you tried, what didnt it work? i mean surely you have an idea

– TheGeneral
Mar 28 at 1:09














@Michael Randall I am still thinking this question. No solution at the moment.

– paddywide
Mar 28 at 1:12





@Michael Randall I am still thinking this question. No solution at the moment.

– paddywide
Mar 28 at 1:12




1




1





You really need to put a better example, and explain what you want a little better. i mean someone should be able to come here and see what you mean instantly. Can you put your inputs and outputs, and a bit more explanation

– TheGeneral
Mar 28 at 1:20





You really need to put a better example, and explain what you want a little better. i mean someone should be able to come here and see what you mean instantly. Can you put your inputs and outputs, and a bit more explanation

– TheGeneral
Mar 28 at 1:20













@paddywide - Please provide sample inputs (several) with the associated outputs - all as valid C# code. Then provide as much code as you can that transforms from the input to the output(s). And then we can help. Right now this is too much like hard work for me to even think about. If it's easy to answer then you get good answers.

– Enigmativity
Mar 28 at 1:38





@paddywide - Please provide sample inputs (several) with the associated outputs - all as valid C# code. Then provide as much code as you can that transforms from the input to the output(s). And then we can help. Right now this is too much like hard work for me to even think about. If it's easy to answer then you get good answers.

– Enigmativity
Mar 28 at 1:38













I counted in mod 3 in answer a few weeks ago : stackoverflow.com/questions/55101245/…

– jdweng
Mar 28 at 2:11





I counted in mod 3 in answer a few weeks ago : stackoverflow.com/questions/55101245/…

– jdweng
Mar 28 at 2:11












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388695%2fget-permutation-of-a-2-dimension-array-matrix-with-trio-state%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • 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.

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%2fstackoverflow.com%2fquestions%2f55388695%2fget-permutation-of-a-2-dimension-array-matrix-with-trio-state%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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현