What computational model supports arbitrarily sized integers?

I want to do some research, but I don’t think it’s important the number of bits it takes to represent the integer input and arithmetic on the abstract machine. So what is the model that addresses this?

Specifically, I want to prove that integer factorization is not in P. If the above is a bad idea, then what model should I be using? Clearly, I would be needing add, sub, mul, and divide instructions.

Why the most dominant programming languages didn’t follow CSP thread model?


I was trying to ask this question in StackOverflow, but later realized that this question is more relevant to general computer science, not specific engineering problems. If you think it’s not, please let me know.

Recently I’ve found out what CSP(Communicating Sequential Processes) is.

According to the article Bell Labs and CSP Threads:

Most computer science undergraduates are forced to read Andrew Birrell’s “An Introduction to Programming with Threads.” The SRC threads model is the one used by most thread packages currently available. The problem with all of these is that they are too low-level. Unlike the communication primitive provided by Hoare, the primitives in the SRC-style threading module must be combined with other techniques, usually shared memory, in order to be used effectively…

Another article Share memory by communicating from Golang blog says:

Traditional threading models (commonly used when writing Java, C++, and Python programs, for example) require the programmer to communicate between threads using shared memory (…)

Go’s concurrency primitives – goroutines and channels – provide an elegant and distinct means of structuring concurrent software. (These concepts have an interesting history that begins with C. A. R. Hoare’s Communicating Sequential Processes.)

Based on what I’ve seen so far, because Hoare proposed CSP in 1978, it seems that there was no reason to use SRC thread model in programming languages ​​like C++(1985), Java(1995) or Python(1990).

So my question is, why the most dominant programming languages didn’t follow Hoare’s thread model?

Here’s my guesses:

  1. Most programmers back then didn’t know about Hoare’s thread model.
  2. Most programmers are used to traditional thread model.

What do you think?

Writing a linear program to model balanced bin packing

Say we want to write a (MI)LP to model the following problem:

Find a parking plan for a set of cars $ K=\{1, …, k\}$ with lengths $ \lambda_i$ . Parking is organised in lanes $ P=\{1, …, p\}$ . The length of a lane is the sum of the cars parking there and may not exceed a specified constant $ L$ . The goal is to balance the lengths of the parking lanes as well as possible. More specifically, we want to minimise the difference of the length of a longest and shortest line.

To me, this seems quite akin to some variant of the Bin Packing problem. Usually, however, we want the number used bins to be minimised.

Here, I am quite confused on how I could come up with an objective function that expresses the balance between the lanes/bins. My main problem is that — as far as I understood it — the objective function has to be linear. Thus, I couldn’t use operations like max, min, absolute value etc.

Can someone help me out here with a hint?

What are the correlation between Actor model and Reactive Programming

Could anyone explain the difference/correlation between the Actor model and Reactive programming?

It seems that they are located at different levels of abstraction – one can design the interaction between the components of any distributed system using Actor approach, they would send messages, and inside the actors, write code in reactive style?

this question related to How do Functional Reactive Programming and the Actor model relate to each other?

However, the answers wasn’t clear enough, and my question relates reactive programming in general, not FRP in particular.

What does a model X need to be so that one program of $X/O(1)$ solve in $X$?

Let $ X=P$ , then we can have function

L = len(input) k = 0 while (L>0):     k = k+1     L = log2(L) if (k mod 4 == c):     for 2^len(input):         pass return 1 

which, for every $ n$ , we have a $ c\in \{0,1,2,3\}$ , making all inputs shorter than $ n$ runs in $ Poly(n)$ time; but no matter what $ c$ is, it doesn’t run in polynomial time. Yet, let $ X=R$ , then proof that finding is possible is shown here.

Note that function

return 1 

always return the same value and is polynomial time, but we require to select one rather than create one program. Proof that creating is possible is shown here.

So what should $ X$ be so that, if solver needs to consider smaller inputs, at least one of the limit(s) of $ X/O(1)$ solve problem in $ X$ ? What should $ X$ be so that, All of the limit(s) of $ X/O(1)$ solve problem in $ X$ ?

Abstract data types (model, principle of no junk)

I have the following abstract data structure

Now i have to find a model that satisfies the principle of no junk and proof that

Could someone advise me to get to a solution and to understand the whole topic?

Thank

1 spec NatSet = Bool and Nat then 2 3 sorts 4 natSet = emptySet | add(natSet, nat) 5 6 ops 7 isEmpty: (natSet) bool, 8 contains: (natSet, nat) bool, 9 union: (natSet, natSet) natSet, 10 intersect: (natSet, natSet) natSet 11 12 vars 13 s,s’: natSet, 14 n,n’: nat 15 16 axioms 17 isEmpty(emptySet) = true 18 isEmpty(add(s, n)) = false 19 20 contains(emptySet, n) = false 21 contains(add(s, n), n) = true 22 n 6= n’ ⇒ contains(add(s, n), n’) = contains(s, n’) 23 24 union(emptySet, s) = s 25 union(add(s, n), s’) = add(union(s,s’), n) 26 27 intersect(emptySet, s’) = emptySet 28 intersect(s, emptySet) = emptySet 29 intersect(add(s, n), add(s’, n)) = add(intersect(s, s’), n) 30 n 6= n’ ⇒ intersect(add(s, n), add(s’, n’)) = 31 union(intersect(s, add(s’, n’)), intersect(add(s, n), s’)) 32 end 

Details on GitHub vulnerability detection model

GitHub introduced automatic vulnerability detection last year. This blog gives a bit of detail: https://github.blog/2018-10-09-applying-machine-intelligence-to-security-alerts/

I am doing a seminar project on this detection and interested to know more about how the machine learning model works. The blog post did not have much resources to continue.

Is there any published paper on their approach? Or anyplace else where I can get more information.

What’s the best way to model similar tables with overlapping functionality?

I’m building a sports event/tournament/league management app for myself, and I’m stuck on the best way to model how Teams should relate to the different competition types.

Some background regarding the goals of the model:

  • using postgresql & graphql
  • Players earn points for participating in various events (tournaments &/or leagues) – calculated after each event.
  • Teams are made up of 1 to multiple players (depending on type of tournament or league) through a team_players join table.
  • Teams currently just have a tournament_id to join them to a tournament.
  • I’m making a separate Leagues table due to enough differences from how Tournament data is stored.
  • However, Tournament Teams & League Teams are exactly the same other than their event type & a couple quirks with how the points system calculates.

The crux of the question: Should I split out LeagueTeams to their own table & duplicate all the application logic that overlaps with TournamentTeams, or should I use one Teams table with 2 foreign keys (league_id or tournament_id)?

I feel like using one Teams table would be faster to get everything wired up on the application side initially, but I’m concerned it could end up complicating things long term…? Will it be more irritating always having to remember to query Teams by their event type in the future? Just trying to make sure I’m not missing something. Any guidance?

What is memory model in computer organization?

I’m new to Computer Organization and even to this community. I didn’t find anything which was simple, clear and up to the point. Any examples supporting the discussion is appreciated. I’m not looking for some text book answer.

Here’s an example of my view to question: What is a Programmer’s Model ? Programmer’s model shows what the CPU has available to a programmer for the execution of computer programs. It covers the CPU resources for execution of the CPU’s instruction set. (resources like state variables, AKA registers that can affect — or be affected by — the execution of instructions)

This programmer’s model would NOT detail hardware, such as how the CPU’s electronic circuitry works, how buses transport data or the I/O peripherals available. i.e. The underlying details of how all of that is actually accomplished are hidden from the programmer.

In other words, the programmer’s model would NOT cover functions that cannot be observed by CPU instructions. [EXCEPTION: those instructions trying to detect hardware operations, such as cache behavior, read/write variances because of varying bus delays etc are excluded]

So, similarly I wish to know what is a Memory Model ?