LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-03-2021, 08:48 AM   #16
tvc457
LQ Newbie
 
Registered: Apr 2010
Posts: 17

Rep: Reputation: 0

Quote:
Originally Posted by lucmove View Post
By "numbers to score and identify a situation" I mean, for example, file permissions. 4, 2, 1, and 0 allow very unique and specific sum combinations that identify each specific situation and can be translated into one single number.

0 (0+0+0) – No permission.
1 (0+0+1) – Only execute permission.
2 (0+2+0) – Only write permission.
3 (0+2+1) – Write and execute permissions.
4 (4+0+0) – Only read permission.
5 (4+0+1) – Read and execute permission.
6 (4+2+0) – Read and write permissions.
7 (4+2+1) – Read, write, and execute permission.

Each sum is unique.

I don't know if there is a name for that specifically in math. Is there?

Anyway, how far can I go and how am I supposed to find other numbers?
The numbers used are all a power of 2:
1,2,4

So you just carry on: 1,2,4,8,16,32,...

It feels like you're missing the simple solution, or am I ?



I don't know what it's called, but every number in that list is the sum of all previous, plus 1. It's just like that ..

Last edited by tvc457; 05-03-2021 at 08:51 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Old situation and New situation bkumar82 Linux - Newbie 2 01-28-2019 01:08 AM
LXer: Identify PCI and USB Wired and Wireless Driver in Linux Identify PCI Driver. Ubuntu, Debian, LXer Syndicated Linux News 0 08-20-2014 07:21 AM
[SOLVED] Print numbers and associated text belonging to an interval of numbers Trd300 Linux - Newbie 27 03-11-2012 05:58 AM
How to read "identify" button press event, or state of "identify" blue led with IPMI? iav Linux - Server 0 01-27-2009 01:13 PM
Adding numbers, break on non-numbers... Cruger Programming 1 03-22-2004 09:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration