Questions tagged [discrete]

46 questions
4
votes
1 answer

Modelica and Event generation of Functions

I try to understand when events are generated in Modelica. In the context of functions I noticed behaviour I didn't expect: functions appear to suppress event generation. I am surprised as this is, to my knowledge, not explicitly stated in the…
user578943
  • 65
  • 4
3
votes
1 answer

How to use Gekko for trajectory optimization in discrete time

I am trying to use Gekko to optimize (dis)charging of a battery energy storage system. Electricity prices per hour EP, energy production from solar panels PV, and energy demand Dem are considered over the entire horizon (0-24h) to minize total costs…
Robert_RP
  • 55
  • 5
3
votes
2 answers

Specification of Multinomial model in Tensorflow Probability

I am playing with a mixed multinomial discrete choice model in Tensorflow Probability. The function should take an input of a choice among 3 alternatives. The chosen alternative is specified by CHOSEN (a # observationsx3 tensor). Below is an update…
Jason Hawkins
  • 545
  • 1
  • 8
  • 21
2
votes
0 answers

Matplotlib - place ticks exactly where discrete colors change

I am trying to plot a colorbar that uses a limited number of colors (discrete). The problem is that the colors don't change where the major and minor ticks appear. The issue is worse with a log scale (which is what I need), but also happen with a…
hbarbosa
  • 101
  • 3
2
votes
1 answer

If a problem A ≤p B, then that B ≤p A, prove or disprove

How to formally prove or disprove that if a problem A ≤p B, then it follows that B ≤p A I intuitively think this should be disproved, but I'm not sure how to go about it.
ChaiTea
  • 55
  • 1
  • 7
1
vote
0 answers

What is the role of two sets of A inputs and P outputs in a double-size add1 module?

I am self studying Discrete Mathematics at the moment. I came across this problem on my Problem Set and I could not understand the diagram at all! Please see Problem 4... The way I understood it was the a variables in the add1 circuit are the…
baletetree
  • 41
  • 3
1
vote
1 answer

Find an array if array(XOR)array[1:] is given

Consider we have array a, and second array b = a[1:](just first element of a deleted). We are given array c which is result of XOR, c[i] = a[i]*b[i] (0<=i
Drem Edys
  • 27
  • 1
  • 4
1
vote
1 answer

How can i prove this discrete math challenge?

A test with 20 questions was applied to 300 people. We know that 8 questions had at least 100 hits and the rest at least 200 hits. Prove that some student got at least 11 questions right.
Duviduvish
  • 11
  • 1
1
vote
0 answers

Orange DM: How does Orange calculates the euclidean distance for categorical data?

I have been using Orange for a while now and am trying to implement some classification methods to classify my data. I am using the Test and Score widget to test a few classification methods (kNN,ANN, etc.) on my dataset and am using k-fold cross…
Marcel
  • 11
  • 1
1
vote
0 answers

Causing unknown signal 6

You are given a set of bars of gold and your goal is to take as much gold as possible into your bag. There is just one copy of each bar and for each bar you can either take it or not (hence you cannot take a fraction of a bar). Problem Description…
1
vote
1 answer

How to zoom in on a specific range of values for a categorical variable in ggplot2?

I just want to zoom in on the x-axis between the values ford and nissan in the mpg dataframe. Package used: tidyverse But I am getting the following error when using the coord_cartesian() function: p<-ggplot(mpg,aes(x=manufacturer,y=class)) …
Steve austin
  • 179
  • 11
0
votes
0 answers

Solve the one-dimensional BVP by fast sine transform in python :

I have no idea to solve this boundary value problem: u''(x)=f(x) x in (0,1),u(0)=alpha, u(1)=beta where u(x)= sin(x). I want to compute the numerical solution with various mesh width h and output the error ||U-u|| in infinity norm, in…
Jason Liu
  • 1
  • 1
0
votes
0 answers

Discrete variable optimisation

For machine learning, we use optimizers that vary the parameters of the cost function to find its minimum in a continuous manner. I am wondering if there are optimizers that do discrete variable optimization? For eg it tries integer values to…
0
votes
1 answer

How can I further analyze high frequency data from discrete wavelet transform?

I applied a discrete wavelet transform to horizontal wind speed data to receive the below plot. I'm basically trying to use the information from the detail coefficient (the turbulent flow) for further analysis, but I'm not sure the best direction to…
tornadogal
  • 13
  • 3
0
votes
0 answers

How to understand autnomous vehicle's pomdp model

Most examples of POMDP are discrete problems, and all the states are known. Like tiger-problem, we know there are two states. However, when modeling the autonomous vehicle, states are always set to {Sego, S1,..., Sn} (Sego = [x,y,theta,v]).…
1
2 3 4