# Sistema inecuaciones con dos incógnitas, pares (x,y) zona factible

kitesandeater shared this question 1 year ago
Answered

Buenas tardes, y gracias de antemano por la ayuda.

¿Es posible calcular el número de pares ordenados (x,y) correspondiente a la zona factible de un sistema de inecuaciones con dos incógnitas?

Adjunto imagen GG del problema planteado. La pregunta en concreto es ¿cuántos lotes de cada tipo puede hacer?

## Comments (5)

1

I'm sure that there will be a more compact way to do it.

Anyway, just to avoid bothering with nested commands:

- create the first line and find its intersections A and B with axes, then do the same with the other line (C, D)

- create a list containing integer coordinates 0<=x<=floor(x(A)) and 0<=y<=floor(y(B)) and do the same with the other line

- keep only the points in each list that are ok with the given inequality (see my "reds" and "blues" lists)

- count how many elements they contain ("redcount" and "bluecount")

- intersect the "reds" and "blues" lists

- count how many points are in the intersection (feasible area)

Many points! So the file is slow. This can be done also with more compact commands and a less step-by-step approach.

Anyway... check the attached file.

1

Thank you Simona. Very good hard work.

1

Hi Simona!, good evening. I have read the inside part of your work [I mean the instructions] and find them difficult to understand due to my insufficient GG knowledge. Moreover, it is also a problem to find good videos in the Internet about GG (at least in Spanish). Maybe might you help me on that?

Thank you once more for your help.

Jose Antonio.

1

si tus cuatro inecuaciones se llaman a,b,c,d (por ejemplo d es d:y>=0) define la inecuacion global a&&b&&c&&d (el doble simbolo && equivale al y logico)

supongamos que esta nueva inecuacion global se llama m (lo más probable es que se llame e) entonces usa la instruccion en ingles keepif(m(P),P,{vertex(m)}) copiala porque es facil equivocar las llaves y los parentesis

luego con las instrucciones de lista para maximo minimo e indexof puedes buscar el punto concreto

1

Muchas gracias mathmagic. Acabo de ver tu post. Intentaré implementar lo que me dices. Te mantendré informado.

Leave a Comment
• GeoGebra
• Help
• Partners
• Contact us
• Feedback & Questions
• This email address is being protected from spambots. You need JavaScript enabled to view it.
• +43 677 6137 2693
© 2021 International GeoGebra Institute