jeudi 1 juin 2023

W11 et les mises à jour et Redmi Dgm.

 Plus je laisse Microsoft faire des mises a jour de mon système w11 moins ca marche bien!

Gestion des écrans, connection au web avec mon Redmi 8A. La liste s'allonge chaque mois.

Je viens de vérifier la connection au web avec une autre machine (LENOVO X230) W11 non mise à jour  par l'intermédiaire d'une connection au REDMI 8A et cela marche!

Donc a priori c'est bien une mise à jour ou un virus sur la première machine (LENOVO  M700) W11 qui a provoqué la panne. 

mercredi 24 mai 2023

Les transactions bancaires et les historiques de paiement et prélèvement.

 Je le redis encore une fois :

 je pense qu'il serait bon d'avoir des libellés explicatifs long pour faciliter les rapprochements  bancaires.

Contenant par exemple le numéro de commande correspondant ou l'année comptable pour les prélèvement automatique de paiement d'énergie.

J'en profite pour inclure une série de messages avec CMB :


jeudi 11 mai 2023

Fdj Connexion impossible.


Suite à une erreur technique, merci de réessayer ultérieurement.

 C'est peut-être parce que j'ai gagné 2,2€ au  Lotto!


mercredi 3 mai 2023

Aliexpress Payment refused.

Trying again and again to pay, I have found out that the payment has been refused because of only one  item in one shop. So I have paid the other items one by one. And choose another shop for the item I could not pay. I think that Aliexpres should have accepted the payment for a part of the order. I have lost much time!

vendredi 28 avril 2023

P=NP chap 5

Although I haven't fixed all the problem in what has already been programmed in salesman-3DIcache.c

(see Chap 4  ) , I will try to explore what could be the next step:

Saving results of duplicated subtrees due to permutations of more than 2 subsequent towns. 

To remind us what it is about, let's try with 6 towns and permutation of two towns:

These to branches below yield the same result because they have the same sub-tree after town 4:

(1,2,3,4,....) and (1,3,2,4,...)  

But it happen also with permutation of 3,4,.....towns. 

Let see how many subtrees yield the same result with 10 towns and permutations of 3 towns:

(1,2,3,4,5,...) ;(1,2,4,3,5,...); (case A)

(1,3,2,4,5,...); (1,3,4,2,5,...);

 (1,4,2,3,5,...) (1,4,3,2,5,...) 

That is interesting because they are more duplications! And the number of town in the permutation can be increased by 1 at each level.

Is it worth it? 

Not sure because a lot of cuts have normally been done in the previous levels! But do we need to do it at each level? I am no able to compute it and will prefer doing some experimentation. What I have seen is that the number of new duplication detected by passing from a 2 towns to a 3 towns permutation is not big. It can be estimated by listing branches at depth level 4  with simul.v1.c  (root being level 0).

 Another problem is  the cost of saving/restoring the result of duplicated sub tree. For now I have used an array  of the type  [N][N][N] (N= Number of towns) and partially initialize it with town I am suppose to encounter at this level. I don't need a memory this size and further more it might become very heavy when using permutation of more than 2 towns. 

So I could compute Z the real  size I need and use database indexing techniques: 

A first approach  could be  (if K is  the index) K=(town1*town2*town3 )%(Z/m) and  see what can be done  to adjust the number of  collisions (like choosing m).

Further more the CPU charge of computing K can been shared vertically because :

K= town1 % (Z/m) * town2 % (Z/m) * town3 % (Z/m)

And we finally have to do a one dim array access and sequentially access collisions.

It is interesting to see that each permutation will produce the same index because * is commutative.

Is it worth it? 

So I will continue with the faith that P=NP.......

More idees:

We can have 2 differents collections of numbers having the same product (like 5*3*4=5*2*6). In order  to avoid this kind of collision we could use the summe 5+3+4=12  and 5+2+6=13 to detect the collision. And 2 permutations still have the same sum because of the commutativity. (excuse me if am to basic, I just want more clarity).   

so we could find a previous result due to subtre duplication with the help of a 2 dim array using both sum and product of the number-id of each town. 

Tye are many questions:

Is too risky ? Can we avoid this risk? 

Can we verify if it is possible up to a certain number of towns: is it possible to have 2 different collections of  k numbers n, n chosen in (1,2,...number of towns),  that have the same product and the same summe?

It must be possible to verify if k isn't too big because we don't have much case to generate: they are combinations. If we choose to store the result of a 10 towns permutation and if the number of towns is N then  max(k)= N * N-1 *........* N-10.

Then is it again possible if we use P%m instead of P? How can we choose m? m primer?

I can't ask my wife!!!!!!!

I repeat my question: if   the  number ni is in the collection C1 and mi in C2, C1 and C2  having both k elements then is true that: 

  • [(sum of ni = sum of mi)   and (product of ni =product of mi) ]<==> C1 = C2  
  • [m exist and (sum of ni = sum of mi)   and (product of ni%m =product of mi%m)] <==> C1 = C2  

? ( m is limited by the size of memory at hand on the computer)

Perhaps I should try to find a third signature of the collection C1. The other signatures are the sum and the product.

Avoiding initialisation:

how can I know I access an array for the firs time: we the use of 2 array and a pointer between the 2 arrays and a global variable: 

a 2 dim array  A1[][] and A2[] and a variable PA2 pointing on A2[0] after initialisation:

I want to store the result R of a subtree defined by P and S :

When I want to store, I get a new pointer on A2 : p=PA2 , PA2=PA2+1

A1[P][S]=p, A2[p]=R

If I want to know if something has already been stored in A2 after initialization.

I get p = A1[P][S] and test p>PA2.

 

11/05/2023

Still not found why I get sometimes a wrong result with salesman-3DIcache.c pgm!

I might have taken a wrong decision. I mean: the functional analysis might be incorrect. What I want to do might be either impossible to do or I have chosen the wrong way to do it. 

Still trying to find out what is wrong by tracing what the pgm do. But it is difficult.

Whatever ....  now, I need to find the error .

The result is sometime correct, depending on the problem I want to solve.

It is encouraging. 

Though....

  





mercredi 26 avril 2023

P = NP Chap 4

In the previous Chapter 3 , I have explained that I got a bad surprise trying to avoid initialisation and use sequence nodes numbers to save and retrieve results from  duplicated subtrees: When cutting some sequence disappears and  what was the initial location for the result doesn't exist anymore and you need to dive when not expected.  I tried several solutions and it hasn't work. Hope not  completely lost.

I fell back to memory initialization with the pgm <salesman-3DIcache.c> . I got a results that sometimes doesn't fit the reference (12 towns). I need to find the bug. 

Generated datas can be verified with the help of the pgm <salesman.v1.c> that is making the computation in a simple way at leaf. In salesman-3DIcache.c I only compute the best distance. It was simpler to verify if it is working.

All new datas (make and several sources) can be found in drive salesman2 and the old in salesman.

This is the pgm salesman.v1.c: a reference used for verifying data out of salesman-3DIcache.

The next source below is  the pgm salesman-3DIcache.c: an attempt to cache datas and cut duplicated subtrees. It is bugged!!

This version use permutations of 2 towns. I think that in order to get polynomial result, we need to use permutations of much more towns. I haven't yet really worked on P/NP  evaluation of this pgm version: I am still busy trying to debug it. But I am still thinking to the future. How will I compare two permutations?  Perhaps by ordering the part of the branch nodes from root to the current node and  inserting at each level a new  town in the ordered list. Explanation:

I have 10 towns {0,1,....9}. Considering a branch described from root to leaf by (0,3,1,2,4...9) we could do:

  • level 0 we get (0)
  • level 1 we order   (0) + 3 ang get (0,3)
  • level 2 we order (0,3) + 2 and get (0,2,3)
it would allow us to share cpu time for the ordering between several nodes horizontally and vertically.
It would be nice to find a solution to also share  horizontally and vertically the CPU time needed to access a multidimensional array..........