Find all the permutations given some finite characters

Click For Summary

Discussion Overview

The discussion revolves around the challenges of finding permutations of a finite set of characters, particularly in the context of programming. Participants explore the differences between performing this task manually and coding an algorithm to achieve the same result.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant expresses difficulty in translating their ability to find permutations on paper into a programming context, questioning their understanding of the concept.
  • Another suggests that an algorithm is necessary for generating permutations in a specific order without duplicates, proposing a recursive method as a potential solution.
  • A different participant emphasizes the need to develop clear, step-by-step instructions for the permutation process, which can then be translated into code.
  • One participant questions the ability to perform the task if it cannot be explained to someone else, implying that understanding is linked to the ability to communicate the process.
  • Another participant challenges the initial claim of being able to find all permutations, asking about the length of strings tested and how one verifies the completeness of the permutations found.
  • Concerns are raised about the participant's programming skills, suggesting that insufficient programming knowledge could hinder the ability to code the permutation process.

Areas of Agreement / Disagreement

Participants express varying views on the relationship between manual and programmed permutations, with no consensus on the underlying understanding or the best approach to coding the solution. The discussion remains unresolved regarding the nature of understanding and the effectiveness of different methods.

Contextual Notes

Participants highlight the importance of clear instructions and algorithmic thinking, but there are unresolved questions about the completeness of permutations and the participants' programming abilities.

jd12345
Messages
251
Reaction score
2
Well I am coming across problems like finding permutation of some n characters. On paper I can find all the permutations given some finite characters easily but when it comes to programming it is hard, why? Why is it hard to tell a computer what I myself can do it so easily?
This is strange - I mean I can do it myself so easily but I can't code it. Does this mean that I myself don't understand it?
 
Technology news on Phys.org


The issue is that you need an algorithm to do the permuations in some specific order, without duplicates. A recursive method may be useful here. You could to a web search for "permuting an array", and find examples of code that does this, or you could grind it out. The two main operations are swapping and rotating of the characters.
 


doing it without thinking is not quite enough, is it?

You need to do it once or twice and develop a set of steps, instructions that work every time and writ them down as if you were to give them to somebody else who does not how to do such thing and they should be able to follow your instructions and do it...

...then, you can give them to a computer...after all, computers are very stupid...they just do what you tell them to do!
 


if i cannot explain it to someone then how am i able to do it ?
 
jd12345 said:
Well I am coming across problems like finding permutation of some n characters. On paper I can find all the permutations given some finite characters easily but when it comes to programming it is hard, why? Why is it hard to tell a computer what I myself can do it so easily?
This is strange - I mean I can do it myself so easily but I can't code it. Does this mean that I myself don't understand it?
Maybe...

Are you sure you can do it yourself? For how long a string have you tried to find all the permutations of? How do you know you've successfully found all permutations?

How well do you know how to program? If you don't know how to program sufficiently well then obviously you won't necessarily be able to program what you know how to do...

Can you even describe in English how to enumerate over all permutations?
 

Similar threads

Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 34 ·
2
Replies
34
Views
5K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K